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

# ChatBoostSourceGiftCode

New in version 20.8.

class telegram.ChatBoostSourceGiftCode(user, *, api_kwargs=None)

  Bases: `telegram.ChatBoostSource`

  The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.

  Available In

  - `telegram.ChatBoost.source`

  - `telegram.ChatBoostRemoved.source`

  New in version 20.8.

  Parameters:

    user (`telegram.User`) – User for which the gift code was created.

  source

    The source of the chat boost. Always `GIFT_CODE`.

    Type:

      `str`

  user

    User for which the gift code was created.

    Type:

      `telegram.User`