mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
ReactionRoles: add a small delay before removing the reaction
This commit is contained in:
parent
6358022442
commit
d694d9f129
1 changed files with 8 additions and 5 deletions
|
@ -209,10 +209,13 @@ export class ReactionRolesPlugin extends ZeppelinPlugin {
|
|||
});
|
||||
}
|
||||
|
||||
const reaction = emoji.id ? `${emoji.name}:${emoji.id}` : emoji.name;
|
||||
this.reactionRemoveQueue.add(async () => {
|
||||
await msg.channel.removeMessageReaction(msg.id, reaction, userId).catch(noop);
|
||||
await sleep(250);
|
||||
});
|
||||
// Remove the reaction after a small delay
|
||||
setTimeout(() => {
|
||||
this.reactionRemoveQueue.add(async () => {
|
||||
const reaction = emoji.id ? `${emoji.name}:${emoji.id}` : emoji.name;
|
||||
await msg.channel.removeMessageReaction(msg.id, reaction, userId).catch(noop);
|
||||
await sleep(250);
|
||||
});
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue