Skip to content

forwardMessages

Sahri Riza Umami edited this page Mar 13, 2017 · 4 revisions

Forwards previously sent messages.

forwardMessages(chat_id, from_chat_id, message_ids, disable_notification)

Returns forwarded messages in the same order as message identifiers passed in message_ids.
If message can't be forwarded, null will be returned instead of the message.
UpdateChatTopMessage will not be sent, so returned messages should be used to update chat top message.

Option Description
chat_id Identifier of a chat to forward messages.
from_chat_id Identifier of a chat to forward from.
message_ids Identifiers of messages to forward.
disable_notification Pass true, to disable notification about the message.
from_background Pass true, if the message is sent from background.

Example

  • Forward message (with id 212) from 567898765 to 1234567890.

    forwardMessages(1234567890, 567898765, {[0] = 212}, 0)
  • Forward messages (with id 17, 8, and 45) from 567898765 to 1234567890 and disable the notification.

    forwardMessages(1234567890, 567898765, {[0] = 17, 8, 45}, 1)

Test script
Frequently Asked Questions
The Functions

Clone this wiki locally