-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Closed
Copy link
Labels
⚙️ bot-apiaffected functionality: bot-apiaffected functionality: bot-api
Description
Is your feature request related to a problem? Please describe.
Even with API 4.7s new Bot.set_my_commands, setting commands will be tiresome
Describe the solution you'd like
- Add
descriptionattribute toCommandHandler - Add
Disptacher.set_commands(update=False, delete=False, add=True)that- gets the bots command from the registered
CommandHandlers - Checks that they are valid for
BotCommandandset_my_commands - gets current commands
- sets new commands with options:
update: IfFalsedon't change a command if already setdelete: IfTrue, delete commands that were set but currently don't have a corresponding handleradd: IfFalseand currently commands are set, doesn't add new ones
- gets the bots command from the registered
Describe alternatives you've considered
Tiresome handwork
Additional context
Bot.set_my_commands is very new, so maybe wait till the next API update to make sure Telegram doesn't change the methods directly
Metadata
Metadata
Assignees
Labels
⚙️ bot-apiaffected functionality: bot-apiaffected functionality: bot-api