diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index 9def04a7..f10b0a5c 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -37,7 +37,7 @@ module.exports = class BanCommand extends Command { const topic = c.topic || ''; if (topic.includes('')) return true; else return false; - }).first() || member.guild.channels.find('name', 'mod-log'); + }).first() || msg.guild.channels.find('name', 'mod-log'); const { member, reason } = args; if (!member.bannable) return msg.say('This member is not bannable. Perhaps they have a higher role than me?'); await msg.say(`Are you sure you want to ban ${member.user.tag} (${member.id})?`); diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index d16b4564..2ca08ad6 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -37,7 +37,7 @@ module.exports = class KickCommand extends Command { const topic = c.topic || ''; if (topic.includes('')) return true; else return false; - }).first() || member.guild.channels.find('name', 'mod-log'); + }).first() || msg.guild.channels.find('name', 'mod-log'); const { member, reason } = args; if (!member.kickable) return msg.say('This member is not kickable. Perhaps they have a higher role than me?'); await msg.say(`Are you sure you want to kick ${member.user.tag} (${member.id})?`); diff --git a/commands/moderation/softban.js b/commands/moderation/softban.js index 8e6c51d3..2868d3e1 100644 --- a/commands/moderation/softban.js +++ b/commands/moderation/softban.js @@ -37,7 +37,7 @@ module.exports = class SoftbanCommand extends Command { const topic = c.topic || ''; if (topic.includes('')) return true; else return false; - }).first() || member.guild.channels.find('name', 'mod-log'); + }).first() || msg.guild.channels.find('name', 'mod-log'); const { member, reason } = args; if (!member.bannable) return msg.say('This member is not bannable. Perhaps they have a higher role than me?'); await msg.say(`Are you sure you want to softban ${member.user.tag} (${member.id})?`); diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index 7448eec7..556d7172 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -37,7 +37,7 @@ module.exports = class UnbanCommand extends Command { const topic = c.topic || ''; if (topic.includes('')) return true; else return false; - }).first() || member.guild.channels.find('name', 'mod-log'); + }).first() || msg.guild.channels.find('name', 'mod-log'); const { id, reason } = args; const bans = await msg.guild.fetchBans(); if (!bans.has(id)) return msg.say('This ID is not in the Guild Banlist.'); diff --git a/commands/moderation/warn.js b/commands/moderation/warn.js index 157b395c..bd0209f7 100644 --- a/commands/moderation/warn.js +++ b/commands/moderation/warn.js @@ -36,7 +36,7 @@ module.exports = class WarnCommand extends Command { const topic = c.topic || ''; if (topic.includes('')) return true; else return false; - }).first() || member.guild.channels.find('name', 'mod-log'); + }).first() || msg.guild.channels.find('name', 'mod-log'); const { member, reason } = args; await msg.say(`Are you sure you want to warn ${member.user.tag} (${member.id})?`); const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, {