Haha-Yes/commands/admin/unban.js

31 lines
807 B
JavaScript
Raw Normal View History

2018-12-30 01:20:24 +01:00
const { Command } = require('discord-akairo');
2018-12-25 19:17:07 +01:00
2018-12-30 01:20:24 +01:00
class UnbanCommand extends Command {
constructor() {
super('unban', {
aliases: ['unban'],
category: 'admin',
args: [
{
id: 'member',
type: 'user'
}
],
clientPermissions: ['BAN_MEMBERS'],
userPermissions: ['BAN_MEMBERS'],
channelRestriction: 'guild',
description: {
content: 'unban users',
usage: '[user id]',
examples: ['267065637183029248']
}
2018-11-13 20:24:23 +01:00
});
}
2018-12-30 01:20:24 +01:00
async exec(message, args) {
message.guild.unban(args.member)
.then(() => message.reply(`user was succesfully unbanned.`));
}
}
module.exports = UnbanCommand;