mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix Mod Commands
This commit is contained in:
@@ -37,7 +37,7 @@ module.exports = class BanCommand extends Command {
|
||||
const topic = c.topic || '';
|
||||
if (topic.includes('<modlog>')) 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})?`);
|
||||
|
||||
@@ -37,7 +37,7 @@ module.exports = class KickCommand extends Command {
|
||||
const topic = c.topic || '';
|
||||
if (topic.includes('<modlog>')) 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})?`);
|
||||
|
||||
@@ -37,7 +37,7 @@ module.exports = class SoftbanCommand extends Command {
|
||||
const topic = c.topic || '';
|
||||
if (topic.includes('<modlog>')) 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})?`);
|
||||
|
||||
@@ -37,7 +37,7 @@ module.exports = class UnbanCommand extends Command {
|
||||
const topic = c.topic || '';
|
||||
if (topic.includes('<modlog>')) 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.');
|
||||
|
||||
@@ -36,7 +36,7 @@ module.exports = class WarnCommand extends Command {
|
||||
const topic = c.topic || '';
|
||||
if (topic.includes('<modlog>')) 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, {
|
||||
|
||||
Reference in New Issue
Block a user