1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/commands/admin/ban.js

28 lines
867 B
JavaScript

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,
clientPermissions: ['BAN_MEMBERS'],
userPermissions: ['BAN_MEMBERS'],
args: [
{
key: 'member',
prompt: 'Wich member would you like to ban?',
type: 'member',
}
]
});
}
run(message) {
const member = message.mentions.members.first();
member.ban(reason.join(" ")).then(member => {
message.reply(`${member.user.username} was succesfully banned.`);
});
}
};