mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
ReactionRoles: slow down reaction removal to avoid rate limiting
This commit is contained in:
parent
ffafc765d8
commit
cb76c47bf4
1 changed files with 2 additions and 2 deletions
|
@ -62,7 +62,7 @@ export class ReactionRolesPlugin extends ZeppelinPlugin {
|
|||
async onLoad() {
|
||||
this.reactionRoles = GuildReactionRoles.getInstance(this.guildId);
|
||||
this.savedMessages = GuildSavedMessages.getInstance(this.guildId);
|
||||
this.reactionRemoveQueue = new Queue(1500);
|
||||
this.reactionRemoveQueue = new Queue(3000);
|
||||
this.pendingRoleChanges = new Map();
|
||||
this.pendingRefreshes = new Set();
|
||||
|
||||
|
@ -346,7 +346,7 @@ export class ReactionRolesPlugin extends ZeppelinPlugin {
|
|||
setTimeout(() => {
|
||||
this.reactionRemoveQueue.add(async () => {
|
||||
const reaction = emoji.id ? `${emoji.name}:${emoji.id}` : emoji.name;
|
||||
const wait = sleep(1000);
|
||||
const wait = sleep(1500);
|
||||
await msg.channel.removeMessageReaction(msg.id, reaction, userId).catch(noop);
|
||||
await wait;
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue