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

x/grammy_files/deps.deno.ts>Context#forwardMessages

Handle and download received media files.
Latest
method Context.prototype.forwardMessages
Re-export
import { Context } from "https://deno.land/x/grammy_files@v1.1.1/deps.deno.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