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

# ChatBoostSourceGiveaway

New in version 20.8.

class telegram.ChatBoostSourceGiveaway(giveaway_message_id, user=None, is_unclaimed=None, *, api_kwargs=None)

  Bases: `telegram.ChatBoostSource`

  The boost was obtained by the creation of a Telegram Premium giveaway. This 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:

    - giveaway_message_id (`int`) – Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn’t sent yet.

    - user (`telegram.User`, optional) – User that won the prize in the giveaway if any.

    - is_unclaimed (`bool`, optional) – `True`, if the giveaway was completed, but there was no user to win the prize.

  source

    Source of the boost. Always `GIVEAWAY`.

    Type:

      `str`

  giveaway_message_id

    Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn’t sent yet.

    Type:

      `int`

  user

    Optional. User that won the prize in the giveaway if any.

    Type:

      `telegram.User`

  is_unclaimed

    Optional. `True`, if the giveaway was completed, but there was no user to win the prize.

    Type:

      `bool`