get_stories_archive()#

Client.get_stories_archive()#

Get all archived stories from a chat by using chat identifier.

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

  • limit (int, optional) – Limits the number of stories to be retrieved. By default, no limit is applied and all stories are returned.

  • offset_id (int, optional) – Identifier of the first story to be returned.

Yields:

Story objects.

Example

# Get stories archive
async for story in app.get_stories_archive(chat_id):
    print(story)