-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
Now filters.text allows messages starting with a /, not excluding bot commands, we need a fast and simpler way to stop those entering filters.text if you want to exclude them.
I propose to change filters.command to the following behavior:
- invoking
filters.commandwill filter any messages withentity.type='bot_command. Basically a mirror of `filters.entity(['bot_command']) which we can just invoke this way) - invoking
filters.command(only_start=True) | filters.command(True)(name is open for discussion) filters any messages that start with a bot command.
this will allow for easily using filters.text & ~filters.command(true) to not get any command updates with your text filter.
Optionally we could make filters.command a data_filter and add the found commands to CallbackContextas thecontext.commands` (list). Although maybe that is outside this scope and then should also be added for commandhandler to add.
Metadata
Metadata
Assignees
Labels
No labels