Skip to content

Commit

Permalink
fix: null incorrectly triggering tags (closes #484)
Browse files Browse the repository at this point in the history
  • Loading branch information
eartharoid committed Nov 8, 2024
1 parent b0d77c1 commit 9f5c30c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/listeners/client/messageCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down

0 comments on commit 9f5c30c

Please sign in to comment.