copy_story()¶
- Client.copy_story()¶
Copy 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”.
from_chat_id (``int`` | ``str``) – Unique identifier (int) or username (str) of the source chat where the original message was sent. 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``) – Message identifier in the chat specified in from_chat_id.
caption (``str``, *optional*) – New caption for story, 0-1024 characters after entities parsing. If not specified, the original caption is kept. Pass “” (empty string) to remove the caption.
period (``int``, *optional*) – How long the story will posted, in secs. only for premium users.
privacy (:obj:`~pyrogram.enums.StoriesPrivacyRules`, *optional*) – Story privacy. Defaults to
PUBLICallowed_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 with
SELECTED_USERS. Works withCLOSE_FRIENDSandSELECTED_USERSonlydisallowed_users (List of ``int`` | ``str``, *optional*) – List of user_id whos disallow to view the stories. Note: Works with
PUBLICandCONTACTSonlyprotect_content (``bool``, *optional*) – Protects the contents of the sent story from forwarding and saving.
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`) – List of special entities that appear in the new caption, which can be specified instead of parse_mode.
- Returns:¶
:obj:`~pyrogram.types.Story` (On success, the copied story is returned.)
Example
# Copy a story await app.copy_story(to_chat, from_chat, 123)