()
| 15 | |
| 16 | |
| 17 | async def main(): |
| 18 | # use in for delete with the necessary scope and language_code if necessary |
| 19 | await bot.delete_my_commands(scope=None, language_code=None) |
| 20 | |
| 21 | await bot.set_my_commands( |
| 22 | commands=[ |
| 23 | telebot.types.BotCommand("command1", "command1 description"), |
| 24 | telebot.types.BotCommand("command2", "command2 description") |
| 25 | ], |
| 26 | # scope=telebot.types.BotCommandScopeChat(12345678) # use for personal command menu for users |
| 27 | # scope=telebot.types.BotCommandScopeAllPrivateChats() # use for all private chats |
| 28 | ) |
| 29 | |
| 30 | cmd = await bot.get_my_commands(scope=None, language_code=None) |
| 31 | print([c.to_json() for c in cmd]) |
| 32 | |
| 33 | |
| 34 | if __name__ == '__main__': |
no test coverage detected
searching dependent graphs…