diff --git a/src/structure/components/observers/Automoderation.js b/src/structure/components/observers/Automoderation.js index 61ab18c..ff4a29f 100644 --- a/src/structure/components/observers/Automoderation.js +++ b/src/structure/components/observers/Automoderation.js @@ -552,7 +552,7 @@ module.exports = class AutoModeration extends Observer { const member = message.member || await guild.members.fetch(author.id).catch(() => null); const settings = await wrapper.settings(); const { invitefilter: setting } = settings; - const { bypass, ignore, actions, silent, enabled, whitelist = [] } = setting; + const { bypass = [], ignore = [], actions, silent, enabled, whitelist = [] } = setting; if (!enabled) return; const roles = member?.roles.cache.map((r) => r.id) || []; diff --git a/src/utilities/SettingsMigrator.js b/src/utilities/SettingsMigrator.js index cedc294..a0e9dc8 100644 --- a/src/utilities/SettingsMigrator.js +++ b/src/utilities/SettingsMigrator.js @@ -398,8 +398,8 @@ class SettingsMigrator { const filter = { ignore: [], silent: false, - bypass: result.invitefilter.roles, - enabled: result.invitefilter.enabled, + bypass: result.invitefilter.roles || [], + enabled: result.invitefilter.enabled || [], actions: [], whitelist: [] };