forwardMessage

inline fun forwardMessage(fromChatId: Identifier, messageId: Long): ForwardMessageAction

Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent Message is returned.

Api reference

Parameters

chatId

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

messageThreadId

Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

fromChatId

Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)

disableNotification

Sends the message silently. Users will receive a notification with no sound.

protectContent

Protects the contents of the forwarded message from forwarding and saving

messageId

Message identifier in the chat specified in from_chat_id


inline fun forwardMessage(fromChatId: Long, messageId: Long): ForwardMessageAction
inline fun forwardMessage(fromChatId: String, messageId: Long): ForwardMessageAction
inline fun forwardMessage(fromChatId: User, messageId: Long): ForwardMessageAction
inline fun forwardMessage(fromChatId: Chat, messageId: Long): ForwardMessageAction