From af585f0200bdb3182be826719d3e178e30655533 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 23 Jan 2022 21:38:51 -0500 Subject: maybe not have leveling enabled when the feature isn't --- src/listeners/message/level.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/listeners/message/level.ts b/src/listeners/message/level.ts index c16e811..5abfd6f 100644 --- a/src/listeners/message/level.ts +++ b/src/listeners/message/level.ts @@ -12,7 +12,8 @@ export default class LevelListener extends BushListener { } public override async exec(...[message]: BushCommandHandlerEvents['messageInvalid']) { - if (message.author.bot || !message.author || !message.guild || !message.guildId) return; + if (message.author.bot || !message.author || !message.inGuild()) return; + if (!(await message.guild.hasFeature('leveling'))) return; if (this.#levelCooldowns.has(`${message.guildId}-${message.author.id}`)) return; if ((await message.guild.getSetting('noXpChannels')).includes(message.channel.id)) return; -- cgit