Skip to content
Back to top
View this page

# TransactionPartnerChat

class telegram.TransactionPartnerChat(chat, gift=None, *, api_kwargs=None)

  Bases: `telegram.TransactionPartner`

  Describes a transaction with a chat.

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

  Available In

  - `telegram.StarTransaction.receiver`

  - `telegram.StarTransaction.source`

  Added in version 21.11.

  Parameters:

    - chat (`telegram.Chat`) – Information about the chat.

    - gift (`telegram.Gift`, optional) – The gift sent to the chat by the bot.

  type

    The type of the transaction partner, always `'chat'`.

    Type:

      `str`

  chat

    Information about the chat.

    Type:

      `telegram.Chat`

  gift

    Optional. The gift sent to the user by the bot.

    Type:

      `telegram.Gift`

  classmethod de_json(data, bot=None)

    See `telegram.TransactionPartner.de_json()`.