Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more
Module

x/grammy_autoquote/deps.deno.ts>Api#sendDice

grammY plugin that forces all sent messages to quote the last received one
Go to Latest
method Api.prototype.sendDice
import { Api } from "https://deno.land/x/grammy_autoquote@v2.0.0/deps.deno.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

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