forwardMessage#
Returns: Message
- class aiogram.methods.forward_message.ForwardMessage(*, chat_id: Union[int, str], from_chat_id: Union[int, str], message_id: int, message_thread_id: Optional[int] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = sentinel.UNSET_PROTECT_CONTENT, **extra_data: Any)[source]#
Use this method to forward messages of any kind. Service messages can’t be forwarded. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#forwardmessage
- 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
- message_thread_id: Optional[int]#
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
- disable_notification: Optional[bool]#
Sends the message silently. Users will receive a notification with no sound.
- protect_content: Optional[bool]#
Protects the contents of the forwarded message from forwarding and saving
Usage#
As bot method#
result: Message = await bot.forward_message(...)
Method as object#
Imports:
from aiogram.methods.forward_message import ForwardMessage
alias:
from aiogram.methods import ForwardMessage
With specific bot#
result: Message = await bot(ForwardMessage(...))
As reply into Webhook in handler#
return ForwardMessage(...)