pin_stories()#

Client.pin_stories()#

Pin one or more stories in a chat by using stories identifiers.

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

  • stories_ids (int | Iterable of int, optional) – List of unique identifiers of the target stories.

  • pinned (bool) – If set to True, the stories will be pinned.

Returns:

List of int – List of pinned stories IDs

Example

# Pin a single story
await app.pin_stories(chat_id, 123456789, True)