Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# BotCommandScopeChat

class telegram.BotCommandScopeChat(chat_id, *, api_kwargs=None)

  Bases: `telegram.BotCommandScope`

  Represents the scope of bot commands, covering a specific chat.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `type` and `chat_id` are equal.

  Use In

  - `telegram.Bot.delete_my_commands()`

  - `telegram.Bot.get_my_commands()`

  - `telegram.Bot.set_my_commands()`

  New in version 13.7.

  Parameters:

    chat_id (`str` | `int`) – Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`).

  type

    Scope type `'chat'`.

    Type:

      `str`

  chat_id

    Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`).

    Type:

      `str` | `int`