summaryrefslogtreecommitdiff
path: root/src/commands/moderation/kick.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/moderation/kick.ts')
-rw-r--r--src/commands/moderation/kick.ts47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts
deleted file mode 100644
index c3e57a2..0000000
--- a/src/commands/moderation/kick.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
-//@ts-ignore this has no types
-import emoji from 'emoji-random'
-
-module.exports = class KickModeration extends Command {
- constructor(client: CommandoClient) {
- super(client, {
- name: 'kick',
- aliases: ['kickuser', 'kick-user'],
- group: 'moderation',
- memberName: 'kick',
- description: 'Kick someone.',
- userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'],
- clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'],
- examples: [
- 'uwu!kick @sin#1337',
- 'uwu!kickuser @sin#1337',
- 'uwu!kick-user @sin#1337'
- ],
- throttling: {
- usages: 5,
- duration: 30
- },
- guildOnly: true
- });
- }
- //@ts-ignore this aint async
- run(msg: CommandoMessage) {
- let userID = msg.mentions.members?.first()
- if (!userID?.id) {
- return msg.reply('No member was mentioned. ' + emoji.random())
- } else if (userID?.id == msg.author.id) {
- return msg.reply('You cannot kick yourself.' + emoji.random())
- } else if (userID?.id == this.client.user?.id) {
- return msg.reply('Not funny. ' + emoji.random())
- } else if (!msg.guild.member(userID.id)) {
- return msg.reply('Member does not exist in server.')
- } else {
- //@ts-ignore stupid typescript error this exists
- msg.guild.members.prune(userID.id)
- return msg.say(`**${userID}** has been kicked!`).then(m => {
- //@ts-ignore this exists
- m.react('🇫');
- })
- }
- }
-}; \ No newline at end of file