From f05c803597e07cbc35e34c705d155208c7649ff6 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 9 May 2022 22:57:31 +0300 Subject: [PATCH] misc bugfixes --- src/structure/client/RateLimiter.js | 2 +- src/structure/client/wrappers/MessageWrapper.js | 4 ++++ src/structure/components/infractions/Unmute.js | 2 +- src/structure/components/observers/CommandHandler.js | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/structure/client/RateLimiter.js b/src/structure/client/RateLimiter.js index 805005d..6bf4500 100644 --- a/src/structure/client/RateLimiter.js +++ b/src/structure/client/RateLimiter.js @@ -18,7 +18,7 @@ class RateLimiter { this.lastSend = {}; //used by limitSend this.lastDelete = {}; - this.sendInterval = 7.5; //How frequently sending is allowed in seconds + this.sendInterval = 5; //How frequently sending is allowed in seconds this.deleteInterval = 2.5; //How frequently delete queues should be executed } diff --git a/src/structure/client/wrappers/MessageWrapper.js b/src/structure/client/wrappers/MessageWrapper.js index ac364dd..d70a16a 100644 --- a/src/structure/client/wrappers/MessageWrapper.js +++ b/src/structure/client/wrappers/MessageWrapper.js @@ -89,6 +89,10 @@ class MessageWrapper { return this._reply.edit(options); } + awaitReactions(...opts) { + return this.message.awaitReactions(...opts); + } + } module.exports = MessageWrapper; \ No newline at end of file diff --git a/src/structure/components/infractions/Unmute.js b/src/structure/components/infractions/Unmute.js index da1d056..4f58f0b 100644 --- a/src/structure/components/infractions/Unmute.js +++ b/src/structure/components/infractions/Unmute.js @@ -117,7 +117,7 @@ class UnmuteInfraction extends Infraction { break; } - if(callback) this.client.moderationManager.removeCallback(callback); + if(callback) this.client.moderationManager.removeCallback(callback, true); await this.handle(); return this._succeed(); diff --git a/src/structure/components/observers/CommandHandler.js b/src/structure/components/observers/CommandHandler.js index 6d8319e..a4d79f2 100644 --- a/src/structure/components/observers/CommandHandler.js +++ b/src/structure/components/observers/CommandHandler.js @@ -475,7 +475,7 @@ class CommandHandler extends Observer { } }; - return invoker.reply(messages[info.type](), { _edit: invoker.replied }); + return invoker.reply({ ...messages[info.type](), _edit: invoker.replied }); }