removed unnecessary assertion
This commit is contained in:
parent
88f53b4af9
commit
4047b7f921
1 changed files with 2 additions and 2 deletions
|
@ -60,10 +60,10 @@ export const ArchiveChannelCmd = channelArchiverCmd({
|
|||
|
||||
while (archivedMessages < maxMessagesToArchive) {
|
||||
const messagesToFetch = Math.min(MAX_MESSAGES_PER_FETCH, maxMessagesToArchive - archivedMessages);
|
||||
const messages = (await args.channel.messages.fetch({
|
||||
const messages = await args.channel.messages.fetch({
|
||||
limit: messagesToFetch,
|
||||
before: previousId as Snowflake,
|
||||
})) as Collection<Snowflake, Message>;
|
||||
});
|
||||
if (messages.size === 0) break;
|
||||
|
||||
for (const message of messages.values()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue