Module

x/grammy/mod.ts>Api#forwardMessages

The Telegram Bot Framework.
Very Popular
Go to Latest
method Api.prototype.forwardMessages
import { Api } from "https://dotland.deno.dev/x/grammy@v1.20.2/mod.ts";

Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned.

Parameters

chat_id: number | string

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

from_chat_id: number | string

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

message_ids: number[]

Identifiers of 1-100 messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.

optional
other: Other<R, "forwardMessages", "chat_id" | "from_chat_id" | "message_ids">

Optional remaining parameters, confer the official reference below

optional
signal: AbortSignal

Optional AbortSignal to cancel the request

Official reference: https://core.telegram.org/bots/api#forwardmessages