Update ban.js
This commit is contained in:
parent
4edb15af8f
commit
d34c9f4f4f
1 changed files with 16 additions and 14 deletions
|
@ -1,19 +1,21 @@
|
||||||
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 caseNum = await caseNumber(client, modlog);
|
|
||||||
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);
|
|
||||||
// message.guild.ban(user, 2);
|
|
||||||
|
|
||||||
const reason = args.splice(1, args.length).join(' ') || `Awaiting moderator's input. Use ${settings.prefix}reason ${caseNum} <reason>.`;
|
const modlog = client.channels.find('name', config.modLogChannel);
|
||||||
const embed = new RichEmbed()
|
const caseNum = await caseNumber(client, modlog);
|
||||||
.setColor(0x00AE86)
|
|
||||||
.setTimestamp()
|
if (!modlog) return message.reply('I cannot find a valid modlog channel.');
|
||||||
.setDescription(`**Action:** Ban\n**Target:** ${user.tag}\n**Moderator:** ${message.author.tag}\n**Reason:** ${reason}`)
|
if (message.mentions.users.size < 1) return message.reply('You must mention someone to ban them.').catch(console.error);
|
||||||
.setFooter(`Case ${caseNum}`);
|
// message.guild.ban(user, 2);
|
||||||
return client.channels.get(modlog.id).send({embed});
|
|
||||||
|
const reason = args.splice(1, args.length).join(' ') || `Awaiting moderator's input. Use ${settings.prefix}reason ${caseNum} <reason>.`;
|
||||||
|
const embed = new RichEmbed()
|
||||||
|
.setColor(0x00AE86)
|
||||||
|
.setTimestamp()
|
||||||
|
.setDescription(`**Action:** Ban\n**Target:** ${user.tag}\n**Moderator:** ${message.author.tag}\n**Reason:** ${reason}`)
|
||||||
|
.setFooter(`Case ${caseNum}`);
|
||||||
|
return client.channels.get(modlog.id).send({embed});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.conf = {
|
exports.conf = {
|
||||||
|
|
Loading…
Reference in a new issue