peyk.platforms.telegram.methods.get_my_commands

async peyk.platforms.telegram.methods.get_my_commands(self, *, scope: BotCommandScopeDefault | BotCommandScopeAllPrivateChats | BotCommandScopeAllGroupChats | BotCommandScopeAllChatAdministrators | BotCommandScopeChat | BotCommandScopeChatAdministrators | BotCommandScopeChatMember | Mapping[str, object] | None = None, language_code: str | None = None) List[BotCommand]

Use this method to get the current list of the bot’s commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren’t set, an empty list is returned.

Parameters:
  • scope – A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.

  • language_code – A two-letter ISO 639-1 language code or an empty string

Returns:

Result returned by Telegram on successful execution.

Return type:

List[BotCommand]