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/Moderation/interrogate.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/Moderation/interrogate.js')
| -rw-r--r-- | commands/Moderation/interrogate.js | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/commands/Moderation/interrogate.js b/commands/Moderation/interrogate.js index 39c10a1..2706f69 100644 --- a/commands/Moderation/interrogate.js +++ b/commands/Moderation/interrogate.js @@ -8,16 +8,22 @@ * *************************************/ exports.run = async (bot, msg) => { - if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); + if (msg.guild.id != '417088992329334792') { + return msg.reply('This is a PokeWorld exclusive command. Sorry!'); + } - if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return msg.reply('I cannot interrogate anyone.'); + if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) { + return msg.reply('I cannot interrogate anyone.'); + } const member = msg.mentions.members.first(); - if (!member) return await msg.reply('Who shall I interrogate? (Remember to @mention them)'); + if (!member) { + return msg.reply('Who shall I interrogate? (Remember to @mention them)'); + } member.addRole(msg.guild.roles.find('name', 'Interrogation')); - const { RichEmbed } = require('discord.js'); + const {RichEmbed} = require('discord.js'); try { const embed = new RichEmbed() .setColor(0x00ae86) @@ -28,25 +34,26 @@ exports.run = async (bot, msg) => { .setTimestamp() .setFooter(`${msg.author.tag} interrogated ${member.user.tag}.`, msg.author.avatarURL); const logChannel = await bot.plugins.settings.getStr('logs', msg.guild.id); - msg.guild.channels.find('id', logChannel).send({ embed }); - } - catch (err) { + msg.guild.channels.find('id', logChannel).send({embed}); + } catch (err) { console.error(err.stack); } }; exports.checkPermission = (bot, member) => { - if (!member.hasPermission('BAN_MEMBERS')) return 'You don\'t have permission to interrogate others. Rip-off detectives...'; + if (!member.hasPermission('BAN_MEMBERS')) { + return 'You don\'t have permission to interrogate others. Rip-off detectives...'; + } return true; -} +}; exports.conf = { aliases: [], - guildOnly: true, + guildOnly: true }; exports.help = { name: 'interrogate', description: 'Interrogate a suspect/user.', - usage: '@user', + usage: '@user' }; |
