summaryrefslogtreecommitdiff
path: root/commands/ban.js
blob: 0ffbe1c99bddb458f6ea9738fdb79fdc6339d516 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module.exports.run = async (client, message, args) => {
    let mreason = args.join(" ").slice(22);

    if (!message.member.permissions.has('BAN_MEMBERS')) return message.reply("It looks like that you don't have the permissions to ban people.")
    const member = message.mentions.members.first();
    if (!member) return message.reply("Uhh... Please mention a member first.");
    member.ban({
        days: args[1] || null,
        reason: `Banned by ${message.author.tag}`
    });
    message.reply("User Banned!");
};

exports.conf = {
  aliases: [],
  guildOnly: true,
};
exports.help = {
  name: 'ban',
  description: 'Bans a member',
  usage: 'ban [user] [time]',
  category: '- Moderation Commands',
};