diff options
| author | 8cy <[email protected]> | 2020-04-23 19:06:09 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-04-23 19:06:09 -0700 |
| commit | 8a2c9df3fd75a08d2b4acabe0b3a6bd62da22b34 (patch) | |
| tree | 08e8b18aebae0b3836de94484185fabb14a860e8 /src/commands/moderation/ban.ts | |
| parent | change mongdburl to mlab, v7.4.2 (diff) | |
| download | dep-core-8a2c9df3fd75a08d2b4acabe0b3a6bd62da22b34.tar.xz dep-core-8a2c9df3fd75a08d2b4acabe0b3a6bd62da22b34.zip | |
shift groups around, new mod cmds, v7.5.0
Diffstat (limited to 'src/commands/moderation/ban.ts')
| -rw-r--r-- | src/commands/moderation/ban.ts | 25 |
1 files changed, 25 insertions, 0 deletions
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 |