1 |
import { BanOptions, CommandInteraction, ContextMenuInteraction, GuildMember, Interaction, Message, User } from 'discord.js'; |
import { BanOptions, CommandInteraction, ContextMenuInteraction, GuildMember, Interaction, Message, Permissions, User } from 'discord.js'; |
2 |
import BaseCommand from '../../utils/structures/BaseCommand'; |
import BaseCommand from '../../utils/structures/BaseCommand'; |
3 |
import DiscordClient from '../../client/Client'; |
import DiscordClient from '../../client/Client'; |
4 |
import CommandOptions from '../../types/CommandOptions'; |
import CommandOptions from '../../types/CommandOptions'; |
14 |
export default class KickCommand extends BaseCommand { |
export default class KickCommand extends BaseCommand { |
15 |
supportsInteractions: boolean = true; |
supportsInteractions: boolean = true; |
16 |
supportsContextMenu: boolean = true; |
supportsContextMenu: boolean = true; |
17 |
|
|
18 |
|
permissions = [Permissions.FLAGS.KICK_MEMBERS]; |
19 |
|
|
20 |
constructor() { |
constructor() { |
21 |
super('kick', 'moderation', ['Kick']); |
super('kick', 'moderation', ['Kick']); |
103 |
guild_id: msg.guild!.id, |
guild_id: msg.guild!.id, |
104 |
mod_id: msg.member!.user.id, |
mod_id: msg.member!.user.id, |
105 |
mod_tag: (msg.member!.user as User).tag, |
mod_tag: (msg.member!.user as User).tag, |
106 |
reason |
reason, |
107 |
|
createdAt: new Date() |
108 |
}); |
}); |
109 |
|
|
110 |
// await History.create(user.id, msg.guild!, 'kick', msg.member!.user.id, typeof reason === 'undefined' ? null : reason); |
// await History.create(user.id, msg.guild!, 'kick', msg.member!.user.id, typeof reason === 'undefined' ? null : reason); |