Message.forward()

Message.forward()

Bound method forward of Message.

Use as a shortcut for:

client.forward_messages(
    chat_id=chat_id,
    from_chat_id=message.chat.id,
    message_ids=message.message_id
)

Example

message.forward(chat_id)
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).

  • disable_notification (bool, optional) – Sends the message silently. Users will receive a notification with no sound.

  • as_copy (bool, optional) – Pass True to forward messages without the forward header (i.e.: send a copy of the message content). Defaults to False.

  • remove_caption (bool, optional) – If set to True and as_copy is enabled as well, media captions are not preserved when copying the message. Has no effect if as_copy is not enabled. Defaults to False.

Returns

On success, the forwarded Message is returned.

Raises

RPCError – In case of a Telegram RPC error.