peyk.platforms.telegram.types.dice

Classes

Dice(emoji, value)

This object represents an animated emoji that displays a random value.

class peyk.platforms.telegram.types.dice.Dice(emoji: str, value: int)[source]

Bases: object

This object represents an animated emoji that displays a random value.

Variables:
  • emoji (str) – Emoji on which the dice throw animation is based

  • value (int) – Value of the dice, 1-6 for ‘’, ‘’ and ‘’ base emoji, 1-5 for ‘’ and ‘’ base emoji, 1-64 for ‘’ base emoji

emoji: str
value: int
classmethod from_dict(data: dict | None) Dice | None[source]

Parse a Telegram API mapping into this type.

Parameters:

data – Raw Telegram API mapping, or None.

Returns:

Parsed type instance, or None when data is None.