Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# ChatBoostSourceGiveaway

Added in version 20.8.

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

  Bases: `telegram.ChatBoostSource`

  The boost was obtained by the creation of a Telegram Premium giveaway or a Telegram Star. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and `prize_star_count` / 500 times for one year for Telegram Star giveaways.

  Available In

  - `telegram.ChatBoost.source`

  - `telegram.ChatBoostRemoved.source`

  Added 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; for Telegram Premium giveaways only.

    - prize_star_count (`int`, optional) –

      The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only.

      Added in version 21.6.

    - 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`

  prize_star_count

    Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only.

    Added in version 21.6.

    Type:

      `int`

  is_unclaimed

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

    Type:

      `bool`