forwardMessage

Description

Use this method to forward messages of any kind. On success, the sent Message is returned.

Arguments

Name Type Description
chat_id Union[int, str] Unique identifier for the target chat or username of the target channel (in the format @channelusername)
from_chat_id Union[int, str] Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
message_id int Message identifier in the chat specified in from_chat_id
disable_notification Optional[bool] Optional. Sends the message silently. Users will receive a notification with no sound.

Response

Type: Message

Description: On success, the sent Message is returned.

Usage

As bot method

result: Message = await bot.forward_message(...)

Method as object

Imports:

  • from aiogram.methods import ForwardMessage
  • from aiogram.api.methods import ForwardMessage
  • from aiogram.api.methods.forward_message import ForwardMessage

In handlers with current bot

result: Message = await ForwardMessage(...)

With specific bot

result: Message = await bot(ForwardMessage(...))

As reply into Webhook in handler

return ForwardMessage(...)