forked from Galactic/galactic-bot
bugfix
This commit is contained in:
parent
3400ff63be
commit
b86417b24f
@ -552,7 +552,7 @@ module.exports = class AutoModeration extends Observer {
|
|||||||
const member = message.member || await guild.members.fetch(author.id).catch(() => null);
|
const member = message.member || await guild.members.fetch(author.id).catch(() => null);
|
||||||
const settings = await wrapper.settings();
|
const settings = await wrapper.settings();
|
||||||
const { invitefilter: setting } = settings;
|
const { invitefilter: setting } = settings;
|
||||||
const { bypass, ignore, actions, silent, enabled, whitelist = [] } = setting;
|
const { bypass = [], ignore = [], actions, silent, enabled, whitelist = [] } = setting;
|
||||||
if (!enabled) return;
|
if (!enabled) return;
|
||||||
const roles = member?.roles.cache.map((r) => r.id) || [];
|
const roles = member?.roles.cache.map((r) => r.id) || [];
|
||||||
|
|
||||||
|
@ -398,8 +398,8 @@ class SettingsMigrator {
|
|||||||
const filter = {
|
const filter = {
|
||||||
ignore: [],
|
ignore: [],
|
||||||
silent: false,
|
silent: false,
|
||||||
bypass: result.invitefilter.roles,
|
bypass: result.invitefilter.roles || [],
|
||||||
enabled: result.invitefilter.enabled,
|
enabled: result.invitefilter.enabled || [],
|
||||||
actions: [],
|
actions: [],
|
||||||
whitelist: []
|
whitelist: []
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user