Skip to content

Commit

Permalink
fix: msg content checks on messageUpdate event
Browse files Browse the repository at this point in the history
Fixes #141. Fixes RTBYTE-H in Sentry.
  • Loading branch information
rasmusgerdin committed Aug 24, 2020
1 parent 2a32749 commit 9dd0207
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/events/rtbyteMessageUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ module.exports = class extends Event {
.setAuthor(msg.author.tag, msg.author.displayAvatarURL())
.setColor(this.client.settings.get('colors.blue'))
.setDescription(`${msg.channel}\n[${msg.language.get('CLICK_TO_VIEW')}](${msg.url})`)
.addField(msg.language.get('GUILD_LOG_BEFORE'), truncate(old.content))
.addField(msg.language.get('GUILD_LOG_AFTER'), truncate(msg.content))
.setTimestamp()
.setFooter(msg.language.get('GUILD_LOG_MESSAGEUPDATE'));

if (old.content) embed.addField(msg.language.get('GUILD_LOG_BEFORE'), truncate(old.content));
if (msg.content) embed.addField(msg.language.get('GUILD_LOG_AFTER'), truncate(msg.content));
const logChannel = await this.client.channels.cache.get(msg.guild.settings.get('channels.log'));
if (logChannel) await logChannel.send('', { disableEveryone: true, embed: embed });

Expand Down

0 comments on commit 9dd0207

Please sign in to comment.