Skip to main content
Module

x/grammy_emoji/deps.deno.ts>Context#replyWithDice

Use emoji names instead of Unicode strings. Copy-pasting emoji sucks.
Go to Latest
method Context.prototype.replyWithDice
Re-export
import { Context } from "https://deno.land/x/grammy_emoji@v1.1.2/deps.deno.ts";

Context-aware alias for api.sendDice. Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.

Parameters

emoji: string

Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, or “🎰”. Dice can have values 1-6 for “🎲” and “🎯”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”

optional
other: Other<"sendDice", "chat_id" | "emoji">

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