boidushya / imposterBot

Source code for u/botwasnotanimposter
MIT License
5 stars 1 forks source link

Bot thinks URL is a username #1

Closed heraldofsolace closed 3 years ago

heraldofsolace commented 3 years ago

Due to the way the regex is set any path of a URL that ends in 'u' is considered a username.

Check this comment

boidushya commented 3 years ago

I am aware of this issue (actually i kinda knew this would happen before i made the regex and even added that to dev log 1 very seriously. I am, however, open to suggestions or pull requests for a different regex that handles usernames better! Meanwhile i will try to come up with a more stable regex but no promises... Thanks for raising the issue nevertheless!

heraldofsolace commented 3 years ago

Probably the .* in front of the regex is the culprit here. I wonder how Reddit detects usernames