9 |
import History from '../../automod/History'; |
import History from '../../automod/History'; |
10 |
import Punishment from '../../models/Punishment'; |
import Punishment from '../../models/Punishment'; |
11 |
import PunishmentType from '../../types/PunishmentType'; |
import PunishmentType from '../../types/PunishmentType'; |
12 |
import { shouldNotModerate } from '../../utils/util'; |
import { hasPermission, shouldNotModerate } from '../../utils/util'; |
13 |
|
|
14 |
export default class KickCommand extends BaseCommand { |
export default class KickCommand extends BaseCommand { |
15 |
supportsInteractions: boolean = true; |
supportsInteractions: boolean = true; |
86 |
} |
} |
87 |
|
|
88 |
try { |
try { |
89 |
|
if (!(await hasPermissions(client, member, msg, null, "You don't have permission to kick this user."))) { |
90 |
|
return; |
91 |
|
} |
92 |
|
|
93 |
if (!user.kickable || shouldNotModerate(client, user)) |
if (!user.kickable || shouldNotModerate(client, user)) |
94 |
throw new Error('User not kickable'); |
throw new Error('User not kickable'); |
95 |
|
|