hide_gift()

Client.hide_gift()

Hide gift on the current user’s or the channel’s profile page.

Note

Requires can_post_messages administrator right in the channel chat.

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 (str) 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.

Returns:

bool – On success, True is returned.

Example

# Hide gift in user profile
await app.hide_gift(owned_gift_id="123")

# Hide gift in channel (owned_gift_id packed in format chatID_savedID)
await app.hide_gift(owned_gift_id="123_456")