RedSparr0w / Discord-bot-pokeclicker

5 stars 12 forks source link

Changed the regexp to prevent unwanted trigger of the PR related replies #59

Closed RegisCoaxans closed 6 months ago

RegisCoaxans commented 6 months ago

It now should happen whenever the message is only compounded of PR references separated with spaces or commas (#123 #4546 #1025), or also uses words like PR, Git, issue, ... It should stop most of the annoying false positive matches.

I have not run the bot, but I tested the regex on https://regex101.com/, though.

RegisCoaxans commented 6 months ago

Lmao, sorry, we happen to try and resolve the same issue at the same time. Feel free to close this PR if you think your changes are enough.

RedSparr0w commented 6 months ago

Thanks for the PR! Will give a test later, probably worthwhile merging, my "fix" will only last so long and I'm sure there's still some of those things that will be in the 4 digits

RegisCoaxans commented 6 months ago

Since we are using markdown to hide links behind prettier text, I removed the uneeded spacing in the reply.

RedSparr0w commented 6 months ago

It still seems to trigger on just the number reference:

#1234

Also looks like the links need to be on their own lines, otherwise it only shows the embed for 1