1 |
import { BanOptions, CommandInteraction, Guild, GuildMember, Interaction, Message, User } from 'discord.js'; |
import { BanOptions, CommandInteraction, Guild, GuildMember, Interaction, Message, User, Permissions } 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'; |
13 |
|
|
14 |
export default class UnbanCommand extends BaseCommand { |
export default class UnbanCommand extends BaseCommand { |
15 |
supportsInteractions: boolean = true; |
supportsInteractions: boolean = true; |
16 |
|
permissions = [Permissions.FLAGS.BAN_MEMBERS]; |
17 |
|
|
18 |
constructor() { |
constructor() { |
19 |
super('unban', 'moderation', []); |
super('unban', 'moderation', []); |
83 |
guild_id: msg.guild!.id, |
guild_id: msg.guild!.id, |
84 |
mod_id: msg.member!.user.id, |
mod_id: msg.member!.user.id, |
85 |
mod_tag: (msg.member!.user as User).tag, |
mod_tag: (msg.member!.user as User).tag, |
86 |
|
createdAt: new Date() |
87 |
}); |
}); |
88 |
|
|
89 |
await History.create(user.id, msg.guild!, 'unban', (msg.member!.user as User).id, null); |
await History.create(user.id, msg.guild!, 'unban', (msg.member!.user as User).id, null); |