Fix !cleaning more than 100 messages
This commit is contained in:
parent
5852adadad
commit
53fea6b88c
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue