Message.forward()

async Message.forward()

Bound method forward of Message.

Use as a shortcut for:

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

Example

await 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). You can also use chat public link in form of t.me/<username> (str).

  • message_thread_id (int, optional) – Unique identifier of a message thread to which the message belongs; for supergroups only

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

  • schedule_date (datetime, optional) – Date when the message will be automatically sent.

  • protect_content (bool, optional) – Protects the contents of the sent message from forwarding and saving.

  • allow_paid_broadcast (bool, optional) – Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots

  • allow_paid_stars (int, optional) – Amount of stars to pay for the message; for bots only.

  • drop_author (bool, optional) – Forwards messages without quoting the original author

  • drop_media_captions (bool, optional) – Forwards messages without media captions.

  • background (bool, optional) – Pass True to send the message in the background.

  • with_my_score (bool, optional) – Forwards games with the user’s score.

  • message_effect_id (int 64-bit, optional) – Unique identifier of the message effect to be added to the message; for private chats only.

  • video_timestamp (int, optional) – Timestamp for the video.

  • quick_reply_shortcut (str | int, optional) – Quick reply shortcut identifier or name.

  • send_as (int | str, optional) – Unique identifier (int) or username (str) of the chat to send the message as.

  • suggested_post (SuggestedPost, optional) – Suggested post information.

  • schedule_repeat_period (int, optional) – Repeat period of the scheduled message.

Returns:

On success, the forwarded Message is returned.

Raises:

RPCError – In case of a Telegram RPC error.