From 421f6defaaf8da8f9314e92e27694e3961dc8c98 Mon Sep 17 00:00:00 2001 From: Dark <7890309+DarkView@users.noreply.github.com> Date: Thu, 17 Jun 2021 01:32:38 +0200 Subject: [PATCH] Remove unnecessary cache lookup --- backend/src/plugins/Utility/commands/CleanCmd.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Utility/commands/CleanCmd.ts b/backend/src/plugins/Utility/commands/CleanCmd.ts index 2e067e01..8e27c286 100644 --- a/backend/src/plugins/Utility/commands/CleanCmd.ts +++ b/backend/src/plugins/Utility/commands/CleanCmd.ts @@ -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