3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Fix !cleaning more than 100 messages

This commit is contained in:
Dragory 2021-08-19 20:06:11 +03:00
parent 5852adadad
commit 53fea6b88c
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -117,7 +117,7 @@ export async function cleanCmd(pluginData: GuildPluginData<UtilityPluginType>, a
while (messagesToClean.length < args.count) { while (messagesToClean.length < args.count) {
const potentialMessages = await targetChannel.messages.fetch({ const potentialMessages = await targetChannel.messages.fetch({
before: beforeId, before: beforeId,
limit: args.count, limit: Math.min(args.count, 100),
}); });
if (potentialMessages.size === 0) break; if (potentialMessages.size === 0) break;