From 00d200c4dc499d2ccc5df381aeef108c3ff40ec6 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 11 May 2022 14:35:58 +0300 Subject: [PATCH] bugfix --- src/structure/components/commands/moderation/Case.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structure/components/commands/moderation/Case.js b/src/structure/components/commands/moderation/Case.js index f7c92c2..0132cf0 100644 --- a/src/structure/components/commands/moderation/Case.js +++ b/src/structure/components/commands/moderation/Case.js @@ -42,8 +42,8 @@ class CaseCommand extends SlashCommand { }, { projection: { _id: 0 } }); if (!infraction) return { emoji: 'failure', index: 'COMMAND_CASE_NOTFOUND', params: { caseID: id.value } }; - if (exp) return `\`\`\`js\n${inspect(infraction)}\`\`\``; - if (changes.value) return { embed: await this._listChanges(invoker, infraction) }; + if (exp?.value) return `\`\`\`js\n${inspect(infraction)}\`\`\``; + if (changes?.value) return { embed: await this._listChanges(invoker, infraction) }; const target = infraction.targetType === 'USER' ? await this.client.resolver.resolveUser(infraction.target) : await guild.resolveChannel(infraction.target); const staff = await this.client.resolver.resolveUser(infraction.executor);