Skip to content
Back to top
View this page

# BotAccessSettings

class telegram.BotAccessSettings(is_access_restricted, added_users=None, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object describes the access settings of a bot.

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

  Returned In

  `telegram.Bot.get_managed_bot_access_settings()`

  Added in version 22.8.

  Parameters:

    - is_access_restricted (`bool`) – `True`, if only selected users can access the bot. The bot’s owner can always access it.

    - added_users (Sequence[`telegram.User`], optional) – The list of other users who have access to the bot if the access is restricted.

  is_access_restricted

    `True`, if only selected users can access the bot. The bot’s owner can always access it.

    Type:

      `bool`

  added_users

    Optional. The list of other users who have access to the bot if the access is restricted.

    Type:

      Sequence[`telegram.User`]

  classmethod de_json(data, bot=None)

    See `telegram.TelegramObject.de_json()`.