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) {
const potentialMessages = await targetChannel.messages.fetch({
before: beforeId,
limit: args.count,
limit: Math.min(args.count, 100),
});
if (potentialMessages.size === 0) break;