forwardMessage

Forward a single message.

Parameters

from: ID

The identifier of the chat to forward the message from.

to: ID

The identifier of the chat to forward the message to.

messageId: number

The identifier of the message to forward.

dropSenderName?: boolean

Whether to not include the original sender of the message that is going to be forwarded.

dropCaption?: boolean

Whether to not include the original caption of the message that is going to be forwarded.

disableNotification?: boolean

Whether to send the message in a silent way without making a sound on the recipients’ clients.

protectContent?: boolean

Whether to protect the contents of the message from copying and forwarding.

replyTo?: ReplyTo

Information on what the message is replying to.

messageThreadId?: number

The identifier of a thread to send the message to.

sendAs?: ID

The identifier of a chat to send the message on behalf of. User-only.

effectId?: number

The identifier of a message effect to be attached to the message.

sendAt?: Date

If specified, the message will be scheduled to be sent at that date. User-only.

businessConnectionId?: string

The identifier of a business connection ID to perform the action on. Bot-only.

Result

Syntax

// Required parameters only.
await client.forwardMessage(from, to, messageId);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.forwardMessage(from, to, messageId, {
    dropSenderName,
    dropCaption,
    disableNotification,
    protectContent,
    replyTo,
    messageThreadId,
    sendAs,
    effectId,
    sendAt,
    businessConnectionId,
});