set_gift_resale_price()

Client.set_gift_resale_price()

Change resale price of a unique gift owned by the current user.

Usable by Users Bots
Parameters:
  • owned_gift_id (str) – Unique identifier of the target gift. For a user gift, you can use the message ID (int) of the gift message. For a channel gift, you can use the packed format chatID_savedID (str). For a upgraded gift, you can use the gift link.

  • price (GiftResalePrice, optional) – The new price for the unique gift. Pass None to disallow gift resale.

Returns:

bool – On success, True is returned.

Example

# Change resale price of a unique gift
await app.set_gift_resale_price(
    owned_gift_id="123456",
    price=types.GiftResalePriceStar(star_count=100)
)

# Change resale price of a unique gift to 10 TONs
await app.set_gift_resale_price(
    owned_gift_id="123456",
    price=types.GiftResalePriceTon(toncoin_cent_count=10000000000) # You can use utils.to_nano(10) for same result
)

# Disallow resale of a unique gift
await app.set_gift_resale_price(owned_gift_id="123456")