Haha-Yes/commands/admin/ban.js

29 lines
886 B
JavaScript
Raw Normal View History

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'],
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-09 21:32:08 +02:00
async run(message) {
2018-09-07 19:07:10 +02:00
const member = message.mentions.members.first();
2018-09-16 03:23:26 +02:00
member.ban().then(member => {
2018-09-07 19:07:10 +02:00
message.reply(`${member.user.username} was succesfully banned.`);
});
}
};