Module

x/grammy/mod.ts>Api#sendDice

The Telegram Bot Framework.
Very Popular
Latest
method Api.prototype.sendDice
import { Api } from "https://dotland.deno.dev/x/grammy@v1.31.0/mod.ts";

Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.

Parameters

chat_id: number | string

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

emoji:
| (string & Record<never, never>)
| "🎲"
| "🎯"
| "🏀"
| "⚽"
| "🎳"
| "🎰"

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<R, "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