Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method
(
self, chat_id: Union[int, str],
from_chat_id: Union[int, str],
message_id: int,
caption: Optional[str]=None,
parse_mode: Optional[str]=None,
caption_entities: Optional[List[types.MessageEntity]]=None,
disable_notification: Optional[bool]=None,
protect_content: Optional[bool]=None,
reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
timeout: Optional[int]=None,
message_thread_id: Optional[int]=None,
reply_parameters: Optional[types.ReplyParameters]=None,
show_caption_above_media: Optional[bool]=None,
allow_paid_broadcast: Optional[bool]=None,
video_start_timestamp: Optional[int]=None,
direct_messages_topic_id: Optional[int]=None,
suggested_post_parameters: Optional[types.SuggestedPostParameters]=None,
message_effect_id: Optional[str]=None)
| 1960 | |
| 1961 | |
| 1962 | def copy_message( |
| 1963 | self, chat_id: Union[int, str], |
| 1964 | from_chat_id: Union[int, str], |
| 1965 | message_id: int, |
| 1966 | caption: Optional[str]=None, |
| 1967 | parse_mode: Optional[str]=None, |
| 1968 | caption_entities: Optional[List[types.MessageEntity]]=None, |
| 1969 | disable_notification: Optional[bool]=None, |
| 1970 | protect_content: Optional[bool]=None, |
| 1971 | reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility |
| 1972 | allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility |
| 1973 | reply_markup: Optional[REPLY_MARKUP_TYPES]=None, |
| 1974 | timeout: Optional[int]=None, |
| 1975 | message_thread_id: Optional[int]=None, |
| 1976 | reply_parameters: Optional[types.ReplyParameters]=None, |
| 1977 | show_caption_above_media: Optional[bool]=None, |
| 1978 | allow_paid_broadcast: Optional[bool]=None, |
| 1979 | video_start_timestamp: Optional[int]=None, |
| 1980 | direct_messages_topic_id: Optional[int]=None, |
| 1981 | suggested_post_parameters: Optional[types.SuggestedPostParameters]=None, |
| 1982 | message_effect_id: Optional[str]=None) -> types.MessageID: |
| 1983 | """ |
| 1984 | Use this method to copy messages of any kind. |
| 1985 | Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. |
| 1986 | A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method |
| 1987 | forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success. |
| 1988 | |
| 1989 | Telegram documentation: https://core.telegram.org/bots/api#copymessage |
| 1990 | |
| 1991 | :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
| 1992 | :type chat_id: :obj:`int` or :obj:`str` |
| 1993 | |
| 1994 | :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) |
| 1995 | :type from_chat_id: :obj:`int` or :obj:`str` |
| 1996 | |
| 1997 | :param message_id: Message identifier in the chat specified in from_chat_id |
| 1998 | :type message_id: :obj:`int` |
| 1999 | |
| 2000 | :param video_start_timestamp: New start timestamp for the copied video in the message |
| 2001 | :type video_start_timestamp: :obj:`int` |
| 2002 | |
| 2003 | :param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept |
| 2004 | :type caption: :obj:`str` |
| 2005 | |
| 2006 | :param parse_mode: Mode for parsing entities in the new caption. |
| 2007 | :type parse_mode: :obj:`str` |
| 2008 | |
| 2009 | :param caption_entities: A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode |
| 2010 | :type caption_entities: Array of :class:`telebot.types.MessageEntity` |
| 2011 | |
| 2012 | :param disable_notification: Sends the message silently. Users will receive a notification with no sound. |
| 2013 | :type disable_notification: :obj:`bool` |
| 2014 | |
| 2015 | :param protect_content: Protects the contents of the sent message from forwarding and saving |
| 2016 | :type protect_content: :obj:`bool` |
| 2017 | |
| 2018 | :param reply_to_message_id: deprecated. |
| 2019 | :type reply_to_message_id: :obj:`int` |