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 /commands/Owners Only/eval.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 'commands/Owners Only/eval.js')
| -rw-r--r-- | commands/Owners Only/eval.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/commands/Owners Only/eval.js b/commands/Owners Only/eval.js index 5153b63..bd0528b 100644 --- a/commands/Owners Only/eval.js +++ b/commands/Owners Only/eval.js @@ -7,8 +7,8 @@ * * *************************************/ -exports.run = async (bot, msg, args) => { - const { RichEmbed } = require('discord.js'); +exports.run = (bot, msg, args) => { + const {RichEmbed} = require('discord.js'); const code = args.join(' '); let evaled; @@ -17,7 +17,7 @@ exports.run = async (bot, msg, args) => { try { remove = text => { if (typeof(text) === 'string') { - return text.replace(/`/g, '`' + String.fromCharCode(8203)).replace(/@/g, '@' + String.fromCharCode(8203)); + return text.replace(/`/g, `\`${String.fromCharCode(8203)}`).replace(/@/g, `@${ String.fromCharCode(8203)}`); } else { return text; } @@ -37,7 +37,7 @@ exports.run = async (bot, msg, args) => { .addField(':outbox_tray: Output:', `\`\`\`${err}\`\`\``) .setFooter('Eval', bot.user.avatarURL) .setColor('RED'); - return msg.channel.send({ embed }); + return msg.channel.send({embed}); } try { @@ -49,7 +49,7 @@ exports.run = async (bot, msg, args) => { .setFooter('Eval', bot.user.avatarURL) .setColor('GREEN'); - return msg.channel.send({ embed }); + return msg.channel.send({embed}); } catch (err) { const embed = new RichEmbed() .setAuthor('Eval Error') @@ -58,22 +58,24 @@ exports.run = async (bot, msg, args) => { .addField(':outbox_tray: Output:', `\`\`\`${err}\`\`\``) .setFooter('Eval', bot.user.avatarURL) .setColor('RED'); - return msg.channel.send({ embed }); + return msg.channel.send({embed}); } }; exports.checkPermission = (bot, member) => { - if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(member.id)) return false; + if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(member.id)) { + return false; + } return true; -} +}; exports.conf = { aliases: ['exec'], - guildOnly: false, + guildOnly: false }; exports.help = { name: 'eval', description: 'Evaluates Javascript Code', - usage: '<code>', + usage: '<code>' }; |
