From 9f5c30c0bfea9a6d7d403654d50cf5543f7f1e58 Mon Sep 17 00:00:00 2001 From: Isaac Date: Fri, 8 Nov 2024 23:21:55 +0000 Subject: [PATCH] fix: `null` incorrectly triggering tags (closes #484) --- src/listeners/client/messageCreate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/listeners/client/messageCreate.js b/src/listeners/client/messageCreate.js index 189cc2f4b..3773228a9 100644 --- a/src/listeners/client/messageCreate.js +++ b/src/listeners/client/messageCreate.js @@ -277,7 +277,7 @@ module.exports = class extends Listener { client.keyv.set(cacheKey, tags, ms('1h')); } - const tag = tags.find(tag => message.content.match(new RegExp(tag.regex, 'mi'))); + const tag = tags.find(tag => tag.regex && message.content.match(new RegExp(tag.regex, 'mi'))); if (tag) { await message.reply({ embeds: [