AffiliateInfo

class telegram.AffiliateInfo(commission_per_mille, amount, affiliate_user=None, affiliate_chat=None, nanostar_amount=None, *, api_kwargs=None)[source]

Bases: telegram.TelegramObject

Contains information about the affiliate that received a commission via this transaction.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their affiliate_user, affiliate_chat, commission_per_mille, amount, and nanostar_amount are equal.

Added in version 21.9.

Parameters:
  • affiliate_user (telegram.User, optional) – The bot or the user that received an affiliate commission if it was received by a bot or a user

  • affiliate_chat (telegram.Chat, optional) – The chat that received an affiliate commission if it was received by a chat

  • commission_per_mille (int) – The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users

  • amount (int) – Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds

  • nanostar_amount (int, optional) – The number of 1e-09 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds

affiliate_user[source]

Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user

Type:

telegram.User

affiliate_chat[source]

Optional. The chat that received an affiliate commission if it was received by a chat

Type:

telegram.Chat

commission_per_mille[source]

The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users

Type:

int

amount[source]

Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds

Type:

int

nanostar_amount[source]

Optional. The number of 1e-09 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds

Type:

int

classmethod de_json(data, bot=None)[source]

See telegram.TelegramObject.de_json().