Send Dice
import { IContext, IMessage } from 'degreet-telegram/src/types'
bot.command('start', async (ctx: IContext): Promise<any> => {
try {
const result: IMessage = await ctx.answer.sendDice('π―')
console.log(result.dice) // { emoji: 'π―', value: 1 (1-6, 6 as max) }
} catch (e: any) {
console.error(e)
}
})
bot.on('dice', console.log) // when user drop dice
Supported dice emojis: π² π― π β½ π³ π°
Last updated