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

x/grammy/mod.ts>Context#react

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

Context-aware alias for api.setMessageReaction. Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.

Parameters

reaction: MaybeArray<ReactionTypeEmoji["emoji"] | ReactionType>

A list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.

optional
other: Other<"setMessageReaction", "chat_id" | "message_id" | "reaction">

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