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
description attribute to CommandHandler
- 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
BotCommand and set_my_commands
- gets current commands
- sets new commands with options:
update: If False don't change a command if already set
delete: If True, delete commands that were set but currently don't have a corresponding handler
add: If False and currently commands are set, doesn't add new ones
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
Is your feature request related to a problem? Please describe.
Even with API 4.7s new
Bot.set_my_commands, setting commands will be tiresomeDescribe the solution you'd like
descriptionattribute toCommandHandlerDisptacher.set_commands(update=False, delete=False, add=True)thatCommandHandlersBotCommandandset_my_commandsupdate: 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 onesDescribe alternatives you've considered
Tiresome handwork
Additional context
Bot.set_my_commandsis very new, so maybe wait till the next API update to make sure Telegram doesn't change the methods directly