Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grammy/mod.ts>Api#forwardMessages

The Telegram Bot Framework.
Very Popular
Latest
method Api.prototype.forwardMessages
import { Api } from "https://deno.land/x/grammy@v1.31.0/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[]

A list of 1-100 identifiers of 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