Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support underscore in command name #307

Merged
merged 3 commits into from
Feb 17, 2023
Merged

Conversation

evis
Copy link
Contributor

@evis evis commented Feb 15, 2023

Fixes #304.

@ex0ns
Copy link
Contributor

ex0ns commented Feb 16, 2023

Thanks for the PR, shouldn't it be |\p{N}|_]+) instead of |\p{N}_]+) (note the additional |). I have tested and both seems to work but I would prefer the version with the | if you don't mind.

Also, maybe we should add it the the second part of the regex in the command method as I think that telegram's username can contains _ as well

Edit: I was wrong about the regex, sorry for that, we should in fact remove the vertical bar | from the group otherwise we will accept commands with it, it does not serve as an OR inside a bracket. If you don't have time to do it in this PR I will open another one after.

Thanks for the fix

@ex0ns ex0ns merged commit e22ab8e into bot4s:master Feb 17, 2023
@evis evis deleted the support_underscore branch February 17, 2023 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support underscore in command name
2 participants