edit_story_privacy()#
- Client.edit_story_privacy()#
Edit the privacy of story.
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).story_id (
int
) – Story identifier in the chat specified in chat_id.privacy (
StoriesPrivacyRules
, optional) – Story privacy. Defaults toPUBLIC
.allowed_users (List of
int
|str
, optional) – List of user_id or chat_id of chat users who are allowed to view stories. Note: chat_id available only withSELECTED_USERS
. Works withCLOSE_FRIENDS
andSELECTED_USERS
onlydisallowed_users (List of
int
|str
, optional) – List of user_id whos disallow to view the stories. Note: Works withPUBLIC
andCONTACTS
only
- Returns:
Story
– On success, the edited story is returned.
Example
# Edit story privacy to public await app.edit_story_privacy(chat_id, story_id, enums.StoriesPrivacyRules.PUBLIC) # Edit the privacy of the story to allow selected users to view the story await app.edit_story_privacy( chat_id, story_id, enums.StoriesPrivacyRules.SELECTED_USERS, allowed_users=[123, 456] )