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
"Official" Bot commands with trailing usernames don't work in groups #139
Comments
I would like to work on it. |
Sure, if you have any idea feel free to propose a pull request |
I don't know if this would work, but would it make sense to just use regex?
|
@ColinTheShark The issue is how to get the bot username to be used inside the filter, automatically. While we have the Maybe we can just match |
Using such a generic Regex would possibly catch updates meant for other clients 🤔 If my bot were (Commenting here parallel to the discussion in the chat to have it in the Issues, too) |
Would it make sense to always call get_me() on Client.start() and make that info available? I guess there are more scenarios where that would be useful... |
I think that will work good
https://gist.github.com/tshipenchko/42b81fb53bd52ca7034eb6f2b1b99799 Commands like that will handle
but |
Hi i have fixed it by modifying a filters.command() and example code for this will be
but dan i suggest not to use this in pyrogram itself since it kinda slows the client down. this could be one of the few solutions for this |
Thought that's already landed in the stable version of Pyrogram only to discover it actually hasn't yet 😢 That's an inconvenience, but not a huge issue though. |
Example:
/start@pyrogrambot
Workaround:
Filters.command(["start", "start@pyrogrambot])
Would be nice to have it automatically handled.
The text was updated successfully, but these errors were encountered: