InputInvoicePremiumGiftCode
- class pyrogram.raw.types.InputInvoicePremiumGiftCode
Used if the user wishes to start a channel/supergroup giveaway or send some giftcodes to members of a channel/supergroup, in exchange for boosts.
Constructor of
InputInvoice.- Details:
Layer:
223ID:
98986C0D
- Parameters:
purpose (
InputStorePaymentPurpose) – Should be populated with inputStorePaymentPremiumGiveaway for giveaways and inputStorePaymentPremiumGiftCode for gifts.option (
PremiumGiftCodeOption) – Should be populated with one of the giveaway options returned by payments.getPremiumGiftCodeOptions, see the giveaways » documentation for more info.
TL Schema
inputInvoicePremiumGiftCode#98986c0d
purpose:InputStorePaymentPurpose
option:PremiumGiftCodeOption
= InputInvoice
Parameter Tree
InputInvoicePremiumGiftCode
├── purpose →
InputStorePaymentPurpose│ │ ├── restore →
true (optional)│ │ └── upgrade →
true (optional)│ │ ├── user_id →
InputUser│ │ │ ├──
InputUserEmpty│ │ │ ├──
InputUserSelf│ │ │ ├──
InputUser│ │ │ └──
InputUserFromMessage│ │ ├── currency →
string│ │ └── amount →
long│ │ ├── users →
Vector < InputUser >│ │ │ ├──
InputUserEmpty│ │ │ ├──
InputUserSelf│ │ │ ├──
InputUser│ │ │ │ ├── user_id →
long│ │ │ │ └── access_hash →
long│ │ │ └──
InputUserFromMessage│ │ │ ├── peer →
InputPeer│ │ │ │ ├──
InputPeerEmpty│ │ │ │ ├──
InputPeerSelf│ │ │ │ ├──
InputPeerChat│ │ │ │ ├──
InputPeerUser│ │ │ │ ├──
InputPeerChannel│ │ │ │ ├──
InputPeerUserFromMessage│ │ │ │ └──
InputPeerChannelFromMessage│ │ │ ├── msg_id →
int│ │ │ └── user_id →
long│ │ ├── boost_peer →
InputPeer (optional)│ │ │ ├──
InputPeerEmpty│ │ │ ├──
InputPeerSelf│ │ │ ├──
InputPeerChat│ │ │ ├──
InputPeerUser│ │ │ ├──
InputPeerChannel│ │ │ ├──
InputPeerUserFromMessage│ │ │ └──
InputPeerChannelFromMessage│ │ ├── currency →
string│ │ ├── amount →
long│ │ └── message →
TextWithEntities (optional)│ │ └──
TextWithEntities│ │ ├── text →
string│ │ └── entities →
Vector < MessageEntity >│ │ ├──
MessageEntityUnknown│ │ ├──
MessageEntityMention│ │ ├──
MessageEntityHashtag│ │ ├──
MessageEntityBotCommand│ │ ├──
MessageEntityUrl│ │ ├──
MessageEntityEmail│ │ ├──
MessageEntityBold│ │ ├──
MessageEntityItalic│ │ ├──
MessageEntityCode│ │ ├──
MessageEntityPre│ │ ├──
MessageEntityTextUrl│ │ ├──
MessageEntityMentionName│ │ ├──
InputMessageEntityMentionName│ │ ├──
MessageEntityPhone│ │ ├──
MessageEntityCashtag│ │ ├──
MessageEntityUnderline│ │ ├──
MessageEntityStrike│ │ ├──
MessageEntityBankCard│ │ ├──
MessageEntitySpoiler│ │ ├──
MessageEntityCustomEmoji│ │ ├──
MessageEntityBlockquote│ │ └──
MessageEntityFormattedDate│ │ ├── only_new_subscribers →
true (optional)│ │ ├── winners_are_visible →
true (optional)│ │ ├── boost_peer →
InputPeer│ │ │ ├──
InputPeerEmpty│ │ │ ├──
InputPeerSelf│ │ │ ├──
InputPeerChat│ │ │ ├──
InputPeerUser│ │ │ ├──
InputPeerChannel│ │ │ ├──
InputPeerUserFromMessage│ │ │ └──
InputPeerChannelFromMessage│ │ ├── additional_peers →
Vector < InputPeer > (optional)│ │ │ ├──
InputPeerEmpty│ │ │ ├──
InputPeerSelf│ │ │ ├──
InputPeerChat│ │ │ ├──
InputPeerUser│ │ │ │ ├── user_id →
long│ │ │ │ └── access_hash →
long│ │ │ ├──
InputPeerChannel│ │ │ │ ├── channel_id →
long│ │ │ │ └── access_hash →
long│ │ │ ├──
InputPeerUserFromMessage│ │ │ │ ├── peer →
InputPeer│ │ │ │ │ ├──
InputPeerEmpty│ │ │ │ │ ├──
InputPeerSelf│ │ │ │ │ ├──
InputPeerChat│ │ │ │ │ ├──
InputPeerUser│ │ │ │ │ ├──
InputPeerChannel│ │ │ │ │ ├──
InputPeerUserFromMessage│ │ │ │ │ └──
InputPeerChannelFromMessage│ │ │ │ ├── msg_id →
int│ │ │ │ └── user_id →
long│ │ │ └──
InputPeerChannelFromMessage│ │ │ ├── peer →
InputPeer│ │ │ │ ├──
InputPeerEmpty│ │ │ │ ├──
InputPeerSelf│ │ │ │ ├──
InputPeerChat│ │ │ │ ├──
InputPeerUser│ │ │ │ ├──
InputPeerChannel│ │ │ │ ├──
InputPeerUserFromMessage│ │ │ │ └──
InputPeerChannelFromMessage│ │ │ ├── msg_id →
int│ │ │ └── channel_id →
long│ │ ├── countries_iso2 →
Vector < string > (optional)│ │ ├── prize_description →
string (optional)│ │ ├── random_id →
long│ │ ├── until_date →
int│ │ ├── currency →
string│ │ └── amount →
long│ │ ├── stars →
long│ │ ├── currency →
string│ │ ├── amount →
long│ │ └── spend_purpose_peer →
InputPeer (optional)│ │ ├──
InputPeerEmpty│ │ ├──
InputPeerSelf│ │ ├──
InputPeerChat│ │ ├──
InputPeerUser│ │ ├──
InputPeerChannel│ │ ├──
InputPeerUserFromMessage│ │ └──
InputPeerChannelFromMessage│ │ ├── user_id →
InputUser│ │ │ ├──
InputUserEmpty│ │ │ ├──
InputUserSelf│ │ │ ├──
InputUser│ │ │ └──
InputUserFromMessage│ │ ├── stars →
long│ │ ├── currency →
string│ │ └── amount →
long│ │ ├── only_new_subscribers →
true (optional)│ │ ├── winners_are_visible →
true (optional)│ │ ├── stars →
long│ │ ├── boost_peer →
InputPeer│ │ │ ├──
InputPeerEmpty│ │ │ ├──
InputPeerSelf│ │ │ ├──
InputPeerChat│ │ │ ├──
InputPeerUser│ │ │ ├──
InputPeerChannel│ │ │ ├──
InputPeerUserFromMessage│ │ │ └──
InputPeerChannelFromMessage│ │ ├── additional_peers →
Vector < InputPeer > (optional)│ │ │ ├──
InputPeerEmpty│ │ │ ├──
InputPeerSelf│ │ │ ├──
InputPeerChat│ │ │ ├──
InputPeerUser│ │ │ │ ├── user_id →
long│ │ │ │ └── access_hash →
long│ │ │ ├──
InputPeerChannel│ │ │ │ ├── channel_id →
long│ │ │ │ └── access_hash →
long│ │ │ ├──
InputPeerUserFromMessage│ │ │ │ ├── peer →
InputPeer│ │ │ │ │ ├──
InputPeerEmpty│ │ │ │ │ ├──
InputPeerSelf│ │ │ │ │ ├──
InputPeerChat│ │ │ │ │ ├──
InputPeerUser│ │ │ │ │ ├──
InputPeerChannel│ │ │ │ │ ├──
InputPeerUserFromMessage│ │ │ │ │ └──
InputPeerChannelFromMessage│ │ │ │ ├── msg_id →
int│ │ │ │ └── user_id →
long│ │ │ └──
InputPeerChannelFromMessage│ │ │ ├── peer →
InputPeer│ │ │ │ ├──
InputPeerEmpty│ │ │ │ ├──
InputPeerSelf│ │ │ │ ├──
InputPeerChat│ │ │ │ ├──
InputPeerUser│ │ │ │ ├──
InputPeerChannel│ │ │ │ ├──
InputPeerUserFromMessage│ │ │ │ └──
InputPeerChannelFromMessage│ │ │ ├── msg_id →
int│ │ │ └── channel_id →
long│ │ ├── countries_iso2 →
Vector < string > (optional)│ │ ├── prize_description →
string (optional)│ │ ├── random_id →
long│ │ ├── until_date →
int│ │ ├── currency →
string│ │ ├── amount →
long│ │ └── users →
int│ ├── restore →
true (optional)│ ├── phone_number →
string│ ├── phone_code_hash →
string│ ├── currency →
string│ └── amount →
long└── option →
PremiumGiftCodeOption├── users →
int├── months →
int├── store_product →
string (optional)├── store_quantity →
int (optional)├── currency →
string└── amount →
longExample
InputInvoicePremiumGiftCode(
purpose=InputStorePaymentPremiumSubscription(),
option=PremiumGiftCodeOption(
users=0,
months=0,
currency="text",
amount=0
),
)