fix: null incorrectly triggering tags (closes #484)

This commit is contained in:
Isaac 2024-11-08 23:21:55 +00:00
parent b0d77c1af6
commit 9f5c30c0bf
No known key found for this signature in database
GPG Key ID: 17700D08381EA590

View File

@ -277,7 +277,7 @@ module.exports = class extends Listener {
client.keyv.set(cacheKey, tags, ms('1h')); 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) { if (tag) {
await message.reply({ await message.reply({
embeds: [ embeds: [