diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index dbc8fc6..5974c53 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -41,6 +41,7 @@ exports.run = async (bot, msg, args) => { .addField('Moderator', msg.author.tag) .setTimestamp() .setFooter(`${msg.author.tag} banned ${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) { diff --git a/commands/Moderation/interrogate.js b/commands/Moderation/interrogate.js index 1887d57..8fa9708 100644 --- a/commands/Moderation/interrogate.js +++ b/commands/Moderation/interrogate.js @@ -20,7 +20,7 @@ exports.run = async (bot, msg) => { if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); - + if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permission to interrogate others. Rip-off detectives...'); if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return msg.reply('I cannot interrogate anyone.'); @@ -39,6 +39,7 @@ exports.run = async (bot, msg) => { .addField('Moderator', msg.author.tag) .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) { diff --git a/commands/Moderation/jail.js b/commands/Moderation/jail.js index 4c21b3f..9923540 100644 --- a/commands/Moderation/jail.js +++ b/commands/Moderation/jail.js @@ -20,7 +20,7 @@ exports.run = async (bot, msg) => { if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); - + if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permission to put members in jail.'); if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return msg.reply('I cannot put anyone in jail.'); @@ -39,6 +39,7 @@ exports.run = async (bot, msg) => { .addField('Moderator', msg.author.tag) .setTimestamp() .setFooter(`${msg.author.tag} put ${member.user.tag} in jail.`, msg.author.avatarURL); + const logChannel = await bot.plugins.settings.getStr('logs', msg.guild.id); msg.guild.channels.find('id', logChannel).send({ embed }); } catch (err) { diff --git a/commands/Moderation/softban.js b/commands/Moderation/softban.js index 70cb1b3..2db58ec 100644 --- a/commands/Moderation/softban.js +++ b/commands/Moderation/softban.js @@ -41,6 +41,7 @@ exports.run = async (bot, msg, args) => { .addField('Moderator', msg.author.tag) .setTimestamp() .setFooter(`${msg.author.tag} softbanned ${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) { diff --git a/commands/Moderation/timeout.js b/commands/Moderation/timeout.js index 5fabd5f..af9c713 100644 --- a/commands/Moderation/timeout.js +++ b/commands/Moderation/timeout.js @@ -20,7 +20,7 @@ exports.run = async (bot, msg) => { if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); - + if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permission to put members in time-out..'); if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return msg.reply('I cannot put anyone in time-out.'); @@ -39,6 +39,7 @@ exports.run = async (bot, msg) => { .addField('Moderator', msg.author.tag) .setTimestamp() .setFooter(`${msg.author.tag} put ${member.user.tag} in time-out.`, msg.author.avatarURL); + const logChannel = await bot.plugins.settings.getStr('logs', msg.guild.id); msg.guild.channels.find('id', logChannel).send({ embed }); } catch (err) { diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index fc965b7..816367d 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -40,6 +40,7 @@ exports.run = async (bot, msg, args) => { } const { RichEmbed } = require('discord.js'); + const logChannel = await bot.plugins.settings.getStr('logs', msg.guild.id); bot.channels.find('id', logChannel).send( new RichEmbed() .setColor(0x00ae86)