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 (
string
, 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 (
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
onlyprotect_content (
bool
, optional) – Protects the contents of the sent story from forwarding and saving.parse_mode (
ParseMode
, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.caption_entities (List of
MessageEntity
) – List of special entities that appear in the new caption, which can be specified instead of parse_mode.
- Returns:
Story
– On success, the copied story is returned.
Example
# Copy a story await app.copy_story(to_chat, from_chat, 123)