get_user_gifts()

Client.get_user_gifts()

Get user star gifts.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use “me” or “self”. For a contact that exists in your Telegram address book you can use his phone number (str).

  • offset (str, optional) – Offset of the results to be returned.

  • limit (int, optional) – Maximum amount of star gifts to be returned.

Returns:

Generator – A generator yielding Gift objects.

Example

async for gift in app.get_user_gifts(chat_id):
    print(gift)