Skip to main content
Module

x/grammy/core/api.ts>Api#sendAnimation

The Telegram Bot Framework.
Extremely Popular
Go to Latest
method Api.prototype.sendAnimation
import { Api } from "https://deno.land/x/grammy@v1.11.1/core/api.ts";

Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.

Parameters

chat_id: number | string

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

animation: InputFile | string

Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data.

optional
other: Other<R, "sendAnimation", "chat_id" | "animation">

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