aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/ban.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/moderation/ban.ts')
-rw-r--r--src/commands/moderation/ban.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts
index e32bf18..8a98998 100644
--- a/src/commands/moderation/ban.ts
+++ b/src/commands/moderation/ban.ts
@@ -90,6 +90,7 @@ export default class BanCommand extends BushCommand {
force
}: { user: User; reason?: { duration: number; contentWithoutTime: string }; days?: number; force: boolean }
): Promise<unknown> {
+ if (!message.guild) return message.util.reply(`${util.emojis.error} This command cannot be used in dms.`);
const member = message.guild!.members.cache.get(user.id) as BushGuildMember;
const useForce = force && message.author.isOwner();
const canModerateResponse = util.moderationPermissionCheck(message.member!, member, 'ban', true, useForce);