2018-09-07 19:07:10 +02:00
|
|
|
const { Command } = require('discord.js-commando');
|
|
|
|
module.exports = class BanCommand extends Command {
|
|
|
|
constructor(client) {
|
|
|
|
super(client, {
|
|
|
|
name: 'ban',
|
|
|
|
group: 'admin',
|
|
|
|
memberName: 'ban',
|
|
|
|
description: 'ban the mentionned user',
|
|
|
|
guildOnly: true,
|
2018-09-07 23:57:57 +02:00
|
|
|
clientPermissions: ['BAN_MEMBERS'],
|
2018-09-07 19:07:10 +02:00
|
|
|
userPermissions: ['BAN_MEMBERS'],
|
2018-09-17 16:32:27 +02:00
|
|
|
guildOnly: true,
|
2018-09-07 19:07:10 +02:00
|
|
|
args: [
|
|
|
|
{
|
|
|
|
key: 'member',
|
|
|
|
prompt: 'Wich member would you like to ban?',
|
|
|
|
type: 'member',
|
|
|
|
}
|
|
|
|
]
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2018-09-23 00:58:33 +02:00
|
|
|
async run(message, { member }) {
|
|
|
|
if(member.id === message.author.id) {
|
|
|
|
message.say("Why would you ban yourself ?")
|
|
|
|
} else
|
2018-09-25 20:09:42 +02:00
|
|
|
member.ban()
|
|
|
|
.then(() => message.reply(`${member.user.username} was succesfully banned.`));
|
2018-09-24 23:08:28 +02:00
|
|
|
|
|
|
|
//TODO
|
|
|
|
//Send a message when the bot didint manage to kick
|
2018-09-25 20:09:42 +02:00
|
|
|
};
|
2018-09-07 19:07:10 +02:00
|
|
|
};
|