8 |
import History from '../../automod/History'; |
import History from '../../automod/History'; |
9 |
import Punishment from '../../models/Punishment'; |
import Punishment from '../../models/Punishment'; |
10 |
import PunishmentType from '../../types/PunishmentType'; |
import PunishmentType from '../../types/PunishmentType'; |
11 |
import { shouldNotModerate } from '../../utils/util'; |
import { shouldNotModerate, hasPermission } from '../../utils/util'; |
12 |
|
|
13 |
export default class BanCommand extends BaseCommand { |
export default class BanCommand extends BaseCommand { |
14 |
supportsInteractions: boolean = true; |
supportsInteractions: boolean = true; |
109 |
try { |
try { |
110 |
const member = await msg.guild?.members.fetch(user.id); |
const member = await msg.guild?.members.fetch(user.id); |
111 |
|
|
112 |
|
if (member && !(await hasPermission(client, member, msg, null, "You don't have permission to ban this user."))) { |
113 |
|
return; |
114 |
|
} |
115 |
|
|
116 |
if (member && shouldNotModerate(client, member)) { |
if (member && shouldNotModerate(client, member)) { |
117 |
await msg.reply({ |
await msg.reply({ |
118 |
embeds: [ |
embeds: [ |