From 55d9303d5da2b13b74586d828c1beefdcaa76012 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 13 Jun 2022 14:37:17 +0300 Subject: [PATCH] bugfix --- src/structure/components/commands/moderation/History.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structure/components/commands/moderation/History.js b/src/structure/components/commands/moderation/History.js index eb10da4..f32a2f1 100644 --- a/src/structure/components/commands/moderation/History.js +++ b/src/structure/components/commands/moderation/History.js @@ -133,7 +133,7 @@ class HistoryCommand extends SlashCommand { let string = stripIndents`**Target:** ${Util.escapeMarkdown(target.tag || target.name)}${verbose?.value ? ` (${target.id})` : ''} **Moderator:** ${executor ? `${Util.escapeMarkdown(executor.tag)}${verbose?.value ? ` (${infraction.executor})` : ''}` : infraction.executor}`; - if (infraction.data.roleIds) { + if (infraction.data?.roleIds) { string += `\n${guild.format('INFRACTION_DESCRIPTIONROLES', { plural: infraction.data.roleIds.length === 1 ? '' : 's', roles: priv ? infraction.data.roleNames.join(', ') : infraction.data.roleIds.map((r) => `<@&${r}>`).join(' ')