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

# ChatBoost

New in version 20.8.

class telegram.ChatBoost(boost_id, add_date, expiration_date, source, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object contains information about a chat boost.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `boost_id`, `add_date`, `expiration_date`, and `source` are equal.

  Available In

  - `telegram.ChatBoostUpdated.boost`

  - `telegram.UserChatBoosts.boosts`

  New in version 20.8.

  Parameters:

    - boost_id (`str`) – Unique identifier of the boost.

    - add_date (`datetime.datetime`) – Point in time when the chat was boosted.

    - expiration_date (`datetime.datetime`) – Point in time when the boost will automatically expire, unless the booster’s Telegram Premium subscription is prolonged.

    - source (`telegram.ChatBoostSource`) – Source of the added boost.

  boost_id

    Unique identifier of the boost.

    Type:

      `str`

  add_date

    Point in time when the chat was boosted. The default timezone of the bot is used for localization, which is UTC unless `telegram.ext.Defaults.tzinfo` is used.

    Type:

      `datetime.datetime`

  expiration_date

    Point in time when the boost will automatically expire, unless the booster’s Telegram Premium subscription is prolonged. The default timezone of the bot is used for localization, which is UTC unless `telegram.ext.Defaults.tzinfo` is used.

    Type:

      `datetime.datetime`

  source

    Source of the added boost.

    Type:

      `telegram.ChatBoostSource`

  classmethod de_json(data, bot)

    See `telegram.TelegramObject.de_json()`.