3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

More fixes, waitForInteraction (replacement for waitForReaction)

This commit is contained in:
Dark 2021-06-02 23:41:05 +02:00
parent edcfd2333f
commit d0c6e6f411
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8
13 changed files with 135 additions and 50 deletions

View file

@ -51,7 +51,7 @@ export async function applyReactionRoleReactionsToMessage(
// Remove old reactions, if any
try {
await targetMessage.removeReactions();
await targetMessage.reactions.removeAll();
} catch (e) {
if (isDiscordRESTError(e)) {
errors.push(`Error ${e.code} while removing old reactions: ${e.message}`);
@ -74,7 +74,7 @@ export async function applyReactionRoleReactionsToMessage(
const emoji = isSnowflake(rawEmoji) ? `foo:${rawEmoji}` : rawEmoji;
try {
await targetMessage.addReaction(emoji);
await targetMessage.reactions.add(emoji);
await sleep(1250); // Make sure we don't hit rate limits
} catch (e) {
if (isDiscordRESTError(e)) {