get_chat_archived_stories()#
- Client.get_chat_archived_stories()#
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).from_story_id (
int
, optional) – Identifier of the story starting from which stories must be returned; use 0 to get results from the last story.limit (
int
, optional) – The maximum number of stories to be returned.. By default, no limit is applied and optimal number of stories chosen by Telegram Server is returned which can be smaller than the specified limit.
- Returns:
Generator
– A generator yieldingStory
objects.
Example
# Get archived stories from specific chat async for story in app.get_chat_archived_stories(chat_id): print(story)