summaryrefslogtreecommitdiff
path: root/src/commands/ban.js
blob: a8d5c6a95542cbdc9e497df1e52d18f7bd08f5de (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: false,
};
exports.help = {
  name: 'ban',
  description: 'Bans a member',
  usage: 'ban [user] [time]',
  category: '- Moderation Commands',
};