From b86417b24f1fa80334d62dc6231dfa0c007eecea Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 31 Aug 2022 23:35:21 +0300 Subject: [PATCH] bugfix --- src/structure/components/observers/Automoderation.js | 2 +- src/utilities/SettingsMigrator.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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: [] };