diff options
| author | Justin <jtsshieh@outlook.com> | 2019-11-02 11:02:19 -0400 |
|---|---|---|
| committer | Justin <jtsshieh@outlook.com> | 2019-11-02 11:02:19 -0400 |
| commit | 7031fa12ba79281edc49df972311c13ad0e8fa53 (patch) | |
| tree | 60410a33fe45add85a9dc962c975be478f3f8cff /events/messageDelete.js | |
| parent | 106530d5dc53166632a6a0ecc8930eb2b1ed4bfd (diff) | |
| download | PokeBot-7031fa12ba79281edc49df972311c13ad0e8fa53.tar.gz PokeBot-7031fa12ba79281edc49df972311c13ad0e8fa53.tar.bz2 PokeBot-7031fa12ba79281edc49df972311c13ad0e8fa53.zip | |
es-lint settings added + linted all files
Diffstat (limited to 'events/messageDelete.js')
| -rw-r--r-- | events/messageDelete.js | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/events/messageDelete.js b/events/messageDelete.js index 5fb2007..05a3a65 100644 --- a/events/messageDelete.js +++ b/events/messageDelete.js @@ -8,8 +8,10 @@ * *************************************/ module.exports = async (bot, msg) => { - const { RichEmbed } = require('discord.js'); - if (!msg.content) return; + const {RichEmbed} = require('discord.js'); + if (!msg.content) { + return; + } try { const embed = new RichEmbed() .setColor(0x00ae86) @@ -19,12 +21,15 @@ module.exports = async (bot, msg) => { .setTimestamp() .setFooter(`Deleted message orginally created by: ${msg.author.tag}`, msg.author.avatarURL); const logChannel = await bot.plugins.settings.getStr('logs', msg.guild.id); - if (!logChannel) return; + if (!logChannel) { + return; + } const channelObj = bot.channels.find('id', logChannel); - if (!channelObj) return; - channelObj.send({ embed }); - } - catch (err) { + if (!channelObj) { + return; + } + channelObj.send({embed}); + } catch (err) { console.error(err.stack); } }; |
