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(' ')