aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moulberry-bush/report.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/moulberry-bush/report.ts')
-rw-r--r--src/commands/moulberry-bush/report.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/commands/moulberry-bush/report.ts b/src/commands/moulberry-bush/report.ts
index becdeeb..fc78a7b 100644
--- a/src/commands/moulberry-bush/report.ts
+++ b/src/commands/moulberry-bush/report.ts
@@ -1,4 +1,5 @@
import { AllowedMentions, BushCommand, type ArgType, type BushMessage } from '#lib';
+import assert from 'assert';
import { ApplicationCommandOptionType, Embed, PermissionFlagsBits } from 'discord.js';
export default class ReportCommand extends BushCommand {
@@ -37,7 +38,9 @@ export default class ReportCommand extends BushCommand {
}
public override async exec(message: BushMessage, { member, evidence }: { member: ArgType<'member'>; evidence: string }) {
- if (!message.guild || !(await message.guild.hasFeature('reporting')))
+ assert(message.inGuild());
+
+ if (!(await message.guild.hasFeature('reporting')))
return await message.util.reply(
`${util.emojis.error} This command can only be used in servers where reporting is enabled.`
);