7 |
import getUser from '../../utils/getUser'; |
import getUser from '../../utils/getUser'; |
8 |
import History from '../../automod/History'; |
import History from '../../automod/History'; |
9 |
import { fetchEmoji } from '../../utils/Emoji'; |
import { fetchEmoji } from '../../utils/Emoji'; |
10 |
|
import Punishment from '../../models/Punishment'; |
11 |
|
import PunishmentType from '../../types/PunishmentType'; |
12 |
|
|
13 |
export default class MassBanCommand extends BaseCommand { |
export default class MassBanCommand extends BaseCommand { |
14 |
supportsInteractions: boolean = true; |
supportsInteractions: boolean = true; |
98 |
|
|
99 |
try { |
try { |
100 |
console.log(banOptions.reason); |
console.log(banOptions.reason); |
101 |
|
|
102 |
|
await Punishment.create({ |
103 |
|
type: PunishmentType.BAN, |
104 |
|
user_id: user.id, |
105 |
|
guild_id: msg.guild!.id, |
106 |
|
mod_id: msg.member!.user.id, |
107 |
|
mod_tag: (msg.member!.user as User).tag, |
108 |
|
reason: banOptions.reason ?? undefined |
109 |
|
}); |
110 |
|
|
111 |
await msg.guild!.bans.create(user, banOptions); |
await msg.guild!.bans.create(user, banOptions); |
112 |
|
|
113 |
usersStr += user.tag + ' (' + user.id + ')\n'; |
usersStr += user.tag + ' (' + user.id + ')\n'; |