Use this method to change the list of the bot's commands. Telegram documentation: https://core.telegram.org/bots/api#setmycommands :param commands: List of BotCommand. At most 100 commands can be specified. :type commands: :obj:`list` of :class:`telebot.types.BotCo
(self, commands: List[types.BotCommand],
scope: Optional[types.BotCommandScope]=None,
language_code: Optional[str]=None)
| 5481 | return apihelper.set_managed_bot_access_settings(self.token, user_id, is_access_restricted, added_user_ids=added_user_ids) |
| 5482 | |
| 5483 | def set_my_commands(self, commands: List[types.BotCommand], |
| 5484 | scope: Optional[types.BotCommandScope]=None, |
| 5485 | language_code: Optional[str]=None) -> bool: |
| 5486 | """ |
| 5487 | Use this method to change the list of the bot's commands. |
| 5488 | |
| 5489 | Telegram documentation: https://core.telegram.org/bots/api#setmycommands |
| 5490 | |
| 5491 | :param commands: List of BotCommand. At most 100 commands can be specified. |
| 5492 | :type commands: :obj:`list` of :class:`telebot.types.BotCommand` |
| 5493 | |
| 5494 | :param scope: The scope of users for which the commands are relevant. |
| 5495 | Defaults to BotCommandScopeDefault. |
| 5496 | :type scope: :class:`telebot.types.BotCommandScope` |
| 5497 | |
| 5498 | :param language_code: A two-letter ISO 639-1 language code. If empty, |
| 5499 | commands will be applied to all users from the given scope, |
| 5500 | for whose language there are no dedicated commands |
| 5501 | :type language_code: :obj:`str` |
| 5502 | |
| 5503 | :return: True on success. |
| 5504 | :rtype: :obj:`bool` |
| 5505 | """ |
| 5506 | return apihelper.set_my_commands(self.token, commands, scope=scope, language_code=language_code) |
| 5507 | |
| 5508 | |
| 5509 | def delete_my_commands(self, scope: Optional[types.BotCommandScope]=None, |
no outgoing calls