Skip to content

Commit

Permalink
fix: false positives for regex (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeadTriXz authored Dec 31, 2023
1 parent f281738 commit 2f9785d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/barry/src/modules/leveling/events/messageCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type GuildMessageCreateDispatchData = PickRequired<GatewayMessageCreateDispatchD
/**
* A regular expression that matches messages that contain a "thank you".
*/
const THANKS_REGEX = /(?:|\s)(?:thank(?:s| you)|ty|thn?x|cheers)(?:\s|)/i;
const THANKS_REGEX = /(\s|^)(thanks?|ty|thn?x|cheers)(\p{P}|\s|$)/iu;

/**
* Tracks user activity and assigns experience and levels based on their participation in the guild.
Expand Down

0 comments on commit 2f9785d

Please # to comment.