Open abhisekp opened 9 years ago
I think this might have been intentional for typos.
I think people never make typos such as tank
instead of thnks
or thnx
, etc. So regex must be modified accordingly.
I don't feel like people talk about tanks too often I would just leave this in and add the others if you think they are needed. At the same time I don't have any strong feelings about this issue.
@dting hence this issue is a Priority 3 and small issue. :smile: This is not a big thing to worry about.
Addressing alternative words (do you want to recognize 'gracias', etc), as well as a more stable/extendable option, I would suggest creating a dictionary of regex patterns rather than making one monster pattern.
@ArielLeslie, @dcsan have to decide whether to include thanks in other languages. But for now, english is way to go. The bot is in beta currently.
May also want to catch thankyou with a missing space.
Another regex thanks bug. @dj8923 types in Hindi. The regex matches the word tak.
Thanks command doesn't run for this
Adding a !
to the first alternative of the last group will fix that, but maybe it should just be any non-word instead of an ever-growing list of punctuation?
Thanks users with the following. Discovered by @brainyfarm
Current RegEx: https://regex101.com/r/hH5cN7/7 Proposed RegEx: https://regex101.com/r/hH5cN7 Repo file: https://github.com/dcsan/gitterbot/blob/master/nap/data/rooms/RoomMessages.js#L47
Replies to unwanted words such as tank and tanks must not be listened to
Don't listen to username with the regex pattern matching thanks.
Also thank on writing the following