diff --git a/event/listeners/log/messageDelete.js b/event/listeners/log/messageDelete.js index 38a353f..e9ad9a7 100644 --- a/event/listeners/log/messageDelete.js +++ b/event/listeners/log/messageDelete.js @@ -10,6 +10,13 @@ class messageDeleteListener extends Listener { } async exec(message) { + if (message.partial) { + await message.fetch() + .catch(err => { + return console.error(err); + }); + } + const logStats = await LogStats.findOne({where: {guild: message.guild.id}}); if (logStats && !message.author.bot) { const fetchedLogs = await message.guild.fetchAuditLogs({ diff --git a/event/listeners/log/messageUpdate.js b/event/listeners/log/messageUpdate.js index 3f8fc43..93dc63a 100644 --- a/event/listeners/log/messageUpdate.js +++ b/event/listeners/log/messageUpdate.js @@ -10,6 +10,13 @@ class messageUpdateListener extends Listener { } async exec(oldMessage, newMessage) { + if (oldMessage.partial) { + await oldMessage.fetch() + .catch(err => { + return console.error(err); + }); + } + const logStats = await LogStats.findOne({where: {guild: newMessage.guild.id}}); if (logStats && oldMessage.content !== newMessage.content && !oldMessage.author.bot) { const channel = this.client.channels.resolve(await logStats.get('channel'));