Haha-Yes/commands/admin/unban.js

31 lines
627 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 {
2019-01-02 08:09:45 +01:00
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
2019-01-02 08:09:45 +01:00
async exec(message, args) {
message.guild.unban(args.member)
.then(() => message.reply('user was succesfully unbanned.'));
}
2018-12-30 01:20:24 +01:00
}
module.exports = UnbanCommand;