update_star_ref_program()

async Client.update_star_ref_program()

Create, edit or delete the affiliate program of a bot we own.

Usable by Users Bots
Parameters:
  • bot (int | str) – Unique identifier (int) or username (str) of the target bot.

  • commission_permille (int) – The permille commission rate (e.g. 100 for 10%). Can be 0 to terminate the affiliate program.

  • duration_months (int, optional) – Indicates the duration of the affiliate program in months; if not set, there is no expiration date.

Returns:

StarRefProgram – The affiliate program details.

Example

program = await app.update_star_ref_program("my_bot", commission_permille=50)