Update ban.js

This commit is contained in:
carol 2020-02-04 11:15:16 -05:00 committed by GitHub
parent 4edb15af8f
commit d34c9f4f4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,10 @@
exports.run = async (client, message, args, level) => { exports.run = async (client, message, args, level) => {
const user = message.mentions.users.first() || client.users.get("username", args[0]).id; const user = message.mentions.users.first() || client.users.get("username", args[0]).id;
parseUser(message, user); parseUser(message, user);
const modlog = client.channels.find('name', config.modLogChannel); const modlog = client.channels.find('name', config.modLogChannel);
const caseNum = await caseNumber(client, modlog); const caseNum = await caseNumber(client, modlog);
if (!modlog) return message.reply('I cannot find a valid modlog channel.'); if (!modlog) return message.reply('I cannot find a valid modlog channel.');
if (message.mentions.users.size < 1) return message.reply('You must mention someone to ban them.').catch(console.error); if (message.mentions.users.size < 1) return message.reply('You must mention someone to ban them.').catch(console.error);
// message.guild.ban(user, 2); // message.guild.ban(user, 2);