This commit is contained in:
Erik 2022-05-11 14:35:58 +03:00
parent cc182c059c
commit 00d200c4dc
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -42,8 +42,8 @@ class CaseCommand extends SlashCommand {
}, { projection: { _id: 0 } }); }, { projection: { _id: 0 } });
if (!infraction) return { emoji: 'failure', index: 'COMMAND_CASE_NOTFOUND', params: { caseID: id.value } }; if (!infraction) return { emoji: 'failure', index: 'COMMAND_CASE_NOTFOUND', params: { caseID: id.value } };
if (exp) return `\`\`\`js\n${inspect(infraction)}\`\`\``; if (exp?.value) return `\`\`\`js\n${inspect(infraction)}\`\`\``;
if (changes.value) return { embed: await this._listChanges(invoker, 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 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); const staff = await this.client.resolver.resolveUser(infraction.executor);