bots.UpdateStarRefProgram
- class pyrogram.raw.functions.bots.UpdateStarRefProgram
Create, edit or delete the affiliate program of a bot we own
- Details:
Layer:
223ID:
778B5AB3
- Parameters:
bot (
InputUser) – The botcommission_permille (
int32-bit) – The permille commission rate: it indicates the share of Telegram Stars received by affiliates for every transaction made by users they referred inside of the bot. The minimum and maximum values for this parameter are contained in the starref_min_commission_permille and starref_max_commission_permille client configuration parameters. Can be 0 to terminate the affiliate program. Both the duration and the commission may only be raised after creation of the program: to lower them, the program must first be terminated and a new one created.duration_months (
int32-bit, optional) – Indicates the duration of the affiliate program; if not set, there is no expiration date.
- Returns:
TL Schema
bots.updateStarRefProgram#778b5ab3
flags:#
bot:InputUser
commission_permille:int
duration_months:flags.0?int
= StarRefProgram
Parameter Tree
InputUserInputUserEmptyInputUserSelfInputUserlonglongInputUserFromMessageInputPeerInputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageInputPeerChannelFromMessageintlongintint (optional)Example
await app.invoke(
UpdateStarRefProgram(
bot=await app.resolve_user(chat_id),
commission_permille=0,
duration_months=0,
)
)