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

x/grammy/mod.ts>Context#forwardMessages

The Telegram Bot Framework.
Very Popular
Latest
method Context.prototype.forwardMessages
Re-export
import { Context } from "https://deno.land/x/grammy@v1.32.0/mod.ts";

Context-aware alias for api.forwardMessages. 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)

message_ids: number[]

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

optional
other: Other<"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