diff --git a/src/structure/components/observers/GuildLogging.js b/src/structure/components/observers/GuildLogging.js index 46d9896..ab0ad31 100644 --- a/src/structure/components/observers/GuildLogging.js +++ b/src/structure/components/observers/GuildLogging.js @@ -134,7 +134,7 @@ class GuildLogger extends Observer { const embed = { title: guild.format(`MSGLOG_THREAD_TITLE`, { action: guild.format('THREAD_SWITCH', { type }, { code: true }), channel: parent?.name || 'Missing parent' }), description: guild.format(`MSGLOG_THREAD_DESC_${type}`, { owner: owner.tag, actor: actor?.tag || 'System', name: thread.name, id: thread.id }), - footer: { text: guild.format('MSGLOG_THREAD_FOOTER', { ownerId: owner.id, channelId: parent.id, threadId: thread.id }) }, + footer: { text: guild.format('MSGLOG_THREAD_FOOTER', { ownerId: owner.id, channelId: parent?.id || 'Missing parent', threadId: thread.id }) }, color: CONSTANTS.COLORS[`THREAD_${type}`] }; diff --git a/src/utilities/SettingsMigrator.js b/src/utilities/SettingsMigrator.js index 0ad6a4e..c1c61b9 100644 --- a/src/utilities/SettingsMigrator.js +++ b/src/utilities/SettingsMigrator.js @@ -259,7 +259,7 @@ class SettingsMigrator { if (automod) { - const thresholdKeys = Object.keys(automod?.thresholds, {}); + const thresholdKeys = Object.keys(automod?.thresholds || {}); const thresholds = {}; for (const key of thresholdKeys) { thresholds[key] = { type: result.automod.thresholds[key].toUpperCase() };