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

x/grammy/mod.ts>Context#replyWithPhoto

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

Context-aware alias for api.sendPhoto. Use this method to send photos. On success, the sent Message is returned.

Parameters

photo: InputFile | string

Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20.

optional
other: Other<"sendPhoto", "chat_id" | "photo">

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#sendphoto