telegram.Dice

class telegram.Dice(value, emoji, **kwargs)

Bases: telegram.base.TelegramObject

This object represents a dice with random value from 1 to 6 for currently supported base eomji. (The singular form of “dice” is “die”. However, PTB mimics the Telegram API, which uses the term “dice”.)

Note

If emoji is “🎯”, a value of 6 currently represents a bullseye, while a value of 1 indicates that the dartboard was missed. However, this behaviour is undocumented and might be changed by Telegram.

value

Value of the dice.

Type:int
emoji

Emoji on which the dice throw animation is based.

Type:str
Parameters:
  • value (int) – Value of the dice, 1-6.
  • emoji (str) – Emoji on which the dice throw animation is based.
ALL_EMOJI = ['🎲', '🎯']

List of all supported base emoji. Currently DICE and DARTS.

Type:List[str]
DARTS = '🎯'

‘🎯’

Type:str
DICE = '🎲'

‘🎲’

Type:str