Skip to content
Back to top
View this page

# ChatBoostSource

Added in version 20.8.

class telegram.ChatBoostSource(source, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  Base class for Telegram ChatBoostSource objects. It can be one of:

  - `telegram.ChatBoostSourcePremium`

  - `telegram.ChatBoostSourceGiftCode`

  - `telegram.ChatBoostSourceGiveaway`

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

  Available In

  - `telegram.ChatBoost.source`

  - `telegram.ChatBoostRemoved.source`

  Added in version 20.8.

  Parameters:

    source (`str`) – The source of the chat boost. Can be one of: `PREMIUM`, `GIFT_CODE`, or `GIVEAWAY`.

  source

    The source of the chat boost. Can be one of: `PREMIUM`, `GIFT_CODE`, or `GIVEAWAY`.

    Type:

      `str`

  GIFT_CODE = 'gift_code'

    `telegram.constants.ChatBoostSources.GIFT_CODE`

  GIVEAWAY = 'giveaway'

    `telegram.constants.ChatBoostSources.GIVEAWAY`

  PREMIUM = 'premium'

    `telegram.constants.ChatBoostSources.PREMIUM`

  classmethod de_json(data, bot=None)

    See `telegram.TelegramObject.de_json()`.