9 |
import Punishment from '../../models/Punishment'; |
import Punishment from '../../models/Punishment'; |
10 |
import PunishmentType from '../../types/PunishmentType'; |
import PunishmentType from '../../types/PunishmentType'; |
11 |
import { fetchEmojiStr } from '../../utils/Emoji'; |
import { fetchEmojiStr } from '../../utils/Emoji'; |
12 |
import { shouldNotModerate } from '../../utils/util'; |
import { hasPermission, shouldNotModerate } from '../../utils/util'; |
13 |
|
|
14 |
export default class SoftBanCommand extends BaseCommand { |
export default class SoftBanCommand extends BaseCommand { |
15 |
supportsInteractions: boolean = true; |
supportsInteractions: boolean = true; |
128 |
try { |
try { |
129 |
const member = await msg.guild!.members.fetch(user.id); |
const member = await msg.guild!.members.fetch(user.id); |
130 |
|
|
131 |
|
if (member && !(await hasPermission(client, member, msg, null, "You don't have permission to softban this user."))) { |
132 |
|
return; |
133 |
|
} |
134 |
|
|
135 |
if (member && shouldNotModerate(client, member)) { |
if (member && shouldNotModerate(client, member)) { |
136 |
await msg.reply({ |
await msg.reply({ |
137 |
embeds: [ |
embeds: [ |