Browse Source

Fix messagesChannel vs message

master
Abheek Dhawan 4 years ago
parent
commit
f53ee4d528
  1. 6
      index.js

6
index.js

@ -287,13 +287,13 @@ client.on('messageDeleteBulk', messages => {
.setTimestamp() .setTimestamp()
.setColor('e7778b'); .setColor('e7778b');
collection.findOne({ guild_id: message.guild.id}, (error, result) => { collection.findOne({ guild_id: messagesChannel.guild.id}, (error, result) => {
if(error) { if(error) {
console.error; console.error;
} }
botLogsChannel = result.bot_logs_id; botLogsChannel = result.bot_logs_id;
if (message.guild.channels.cache.get(botLogsChannel)) { if (messagesChannel.guild.channels.cache.get(botLogsChannel)) {
message.guild.channels.cache.get(botLogsChannel).send(deleteEmbed).catch(console.error); messagesChannel.guild.channels.cache.get(botLogsChannel).send(deleteEmbed).catch(console.error);
} }
}); });
}); });

Loading…
Cancel
Save