From 53fea6b88cdf7240a9bada48b5b218654f64c5f1 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Thu, 19 Aug 2021 20:06:11 +0300 Subject: [PATCH] Fix !cleaning more than 100 messages --- backend/src/plugins/Utility/commands/CleanCmd.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Utility/commands/CleanCmd.ts b/backend/src/plugins/Utility/commands/CleanCmd.ts index 0d42bf8c..185f2036 100644 --- a/backend/src/plugins/Utility/commands/CleanCmd.ts +++ b/backend/src/plugins/Utility/commands/CleanCmd.ts @@ -117,7 +117,7 @@ export async function cleanCmd(pluginData: GuildPluginData, a while (messagesToClean.length < args.count) { const potentialMessages = await targetChannel.messages.fetch({ before: beforeId, - limit: args.count, + limit: Math.min(args.count, 100), }); if (potentialMessages.size === 0) break;