Remove unnecessary cache lookup

This commit is contained in:
Dark 2021-06-17 01:32:38 +02:00
parent b0329dca05
commit 421f6defaa
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8

View file

@ -32,7 +32,7 @@ async function cleanMessages(
pluginData.state.logs.ignoreLog(LogType.MESSAGE_DELETE_BULK, idsToDelete[0]);
// Actually delete the messages
(pluginData.guild.channels.cache.get(channel.id) as TextChannel).bulkDelete(idsToDelete);
channel.bulkDelete(idsToDelete);
await pluginData.state.savedMessages.markBulkAsDeleted(idsToDelete);
// Create an archive