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:
parent
edcfd2333f
commit
d0c6e6f411
13 changed files with 135 additions and 50 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue