> For the complete documentation index, see [llms.txt](https://degreetpro.gitbook.io/degreet-telegram/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://degreetpro.gitbook.io/degreet-telegram/additional/send-dice.md).

# Send Dice

{% tabs %}
{% tab title="TypeScript" %}

```typescript
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
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
bot.command('start', async (ctx) => {
  try {
    const result = await ctx.answer.sendDice('🎯')
    console.log(result.dice) // { emoji: '🎯', value: 1 (1-6, 6 as max) }
  } catch (e) {
    console.error(e)
  }
})

bot.on('dice', console.log) // when user drop dice
```

{% endtab %}
{% endtabs %}

Supported dice emojis: 🎲 🎯 🏀 ⚽ 🎳 🎰
