From f53ee4d5287cf172437fb17633bc1a0181a2fbc7 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Fri, 2 Apr 2021 15:24:50 -0500 Subject: [PATCH] Fix messagesChannel vs message --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 70005dc..25a2359 100644 --- a/index.js +++ b/index.js @@ -287,13 +287,13 @@ client.on('messageDeleteBulk', messages => { .setTimestamp() .setColor('e7778b'); - collection.findOne({ guild_id: message.guild.id}, (error, result) => { + collection.findOne({ guild_id: messagesChannel.guild.id}, (error, result) => { if(error) { console.error; } botLogsChannel = result.bot_logs_id; - if (message.guild.channels.cache.get(botLogsChannel)) { - message.guild.channels.cache.get(botLogsChannel).send(deleteEmbed).catch(console.error); + if (messagesChannel.guild.channels.cache.get(botLogsChannel)) { + messagesChannel.guild.channels.cache.get(botLogsChannel).send(deleteEmbed).catch(console.error); } }); });