From 8a2c9df3fd75a08d2b4acabe0b3a6bd62da22b34 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Thu, 23 Apr 2020 19:06:09 -0700 Subject: shift groups around, new mod cmds, v7.5.0 --- src/commands/moderation/ban.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/commands/moderation/ban.ts (limited to 'src/commands/moderation/ban.ts') diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts new file mode 100644 index 0000000..45f5298 --- /dev/null +++ b/src/commands/moderation/ban.ts @@ -0,0 +1,25 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; + +module.exports = class BanModeration extends Command { + constructor(client) { + super(client, { + name: 'ban', + aliases: ['banuser', 'ban-user'], + group: 'moderation', + memberName: 'ban', + description: 'Ban someone.', + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'], + examples: ['uwu!ban @sin#1337'] + }); + } + run(msg: CommandoMessage) { + let userID = msg.mentions.members?.first().id + if (!msg.guild.member(userID)) { + msg.reply('Member does not exist in server.') + } else { + msg.guild.members.ban(userID) + msg.say(`User **${userID}** has been banned!`) + } + } +}; \ No newline at end of file -- cgit v1.2.3