Copy messages of any kind.
The method is analogous to the method
forward_messages(), but the copied message doesn’t have a link to the original message.
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).
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).
int) – Message identifier in the chat specified in from_chat_id.
string, optional) – New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept. Pass “” (empty string) to remove the caption.
str, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together. Pass “markdown” or “md” to enable Markdown-style parsing only. Pass “html” to enable HTML-style parsing only. Pass None to completely disable style parsing.
caption_entities (List of
MessageEntity) – List of special entities that appear in the new caption, which can be specified instead of parse_mode.
bool, optional) – Sends the message silently. Users will receive a notification with no sound.
int, optional) – If the message is a reply, ID of the original message.
int, optional) – Date when the message will be automatically sent. Unix time.
ForceReply, optional) – Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
Message– On success, the copied message is returned.
# Copy a message app.copy_message("me", "pyrogram", 20)