Browse Source

Use message and editedMessage instead of channel

master
Abheek Dhawan 4 years ago
parent
commit
f7b717debf
  1. 8
      index.js

8
index.js

@ -271,8 +271,8 @@ client.on('messageDelete', message => {
console.error; console.error;
} }
botLogsChannel = result.bot_logs_id; botLogsChannel = result.bot_logs_id;
if (channel.guild.channels.cache.get(botLogsChannel)) { if (message.guild.channels.cache.get(botLogsChannel)) {
channel.guild.channels.cache.get(botLogsChannel).send(deleteEmbed).catch(console.error); message.guild.channels.cache.get(botLogsChannel).send(deleteEmbed).catch(console.error);
} }
}); });
}); });
@ -295,8 +295,8 @@ client.on('messageUpdate', (originalMessage, editedMessage) => {
console.error; console.error;
} }
botLogsChannel = result.bot_logs_id; botLogsChannel = result.bot_logs_id;
if (channel.guild.channels.cache.get(botLogsChannel)) { if (editedMessage.guild.channels.cache.get(botLogsChannel)) {
channel.guild.channels.cache.get(botLogsChannel).send(editEmbed).catch(console.error); editedMessage.guild.channels.cache.get(botLogsChannel).send(editEmbed).catch(console.error);
} }
}); });
} }

Loading…
Cancel
Save