aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-23 21:38:51 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-23 21:38:51 -0500
commitaf585f0200bdb3182be826719d3e178e30655533 (patch)
treeec635d9701827668f569cad4ec9a4fa8f4e54b10
parenta3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a (diff)
downloadtanzanite-af585f0200bdb3182be826719d3e178e30655533.tar.gz
tanzanite-af585f0200bdb3182be826719d3e178e30655533.tar.bz2
tanzanite-af585f0200bdb3182be826719d3e178e30655533.zip
maybe not have leveling enabled when the feature isn't
-rw-r--r--src/listeners/message/level.ts3
1 files changed, 2 insertions, 1 deletions
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;