Skip to content
Back to top
View this page

# BackgroundType

Added in version 21.2.

class telegram.BackgroundType(type, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  Base class for Telegram BackgroundType Objects. It can be one of:

  - `telegram.BackgroundTypeFill`

  - `telegram.BackgroundTypeWallpaper`

  - `telegram.BackgroundTypePattern`

  - `telegram.BackgroundTypeChatTheme`.

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

  Available In

  `telegram.ChatBackground.type`

  Added in version 21.2.

  Parameters:

    type (`str`) – Type of the background. Can be one of: `FILL`, `WALLPAPER` `PATTERN` or `CHAT_THEME`.

  type

    Type of the background. Can be one of: `FILL`, `WALLPAPER` `PATTERN` or `CHAT_THEME`.

    Type:

      `str`

  CHAT_THEME = 'chat_theme'

    `telegram.constants.BackgroundTypeType.CHAT_THEME`

  FILL = 'fill'

    `telegram.constants.BackgroundTypeType.FILL`

  PATTERN = 'pattern'

    `telegram.constants.BackgroundTypeType.PATTERN`

  WALLPAPER = 'wallpaper'

    `telegram.constants.BackgroundTypeType.WALLPAPER`

  classmethod de_json(data, bot=None)

    See `telegram.TelegramObject.de_json()`.