diff --git a/src/TgBotLib/Objects/Dice.php b/src/TgBotLib/Objects/Dice.php new file mode 100644 index 0000000..5389946 --- /dev/null +++ b/src/TgBotLib/Objects/Dice.php @@ -0,0 +1,65 @@ +emoji; + } + + /** + * @return int + */ + public function getValue(): int + { + return $this->value; + } + + /** + * Constructs object from array representation + * + * @return array + */ + public function toArray(): array + { + return [ + 'emoji' => $this->emoji, + 'value' => $this->value, + ]; + } + + /** + * Constructs object from array representation + * + * @param array $data + * @return ObjectTypeInterface + */ + public static function fromArray(array $data): ObjectTypeInterface + { + $object = new self(); + + $object->emoji = @$data['emoji'] ?? null; + $object->value = @$data['value'] ?? null; + + return $object; + } + } \ No newline at end of file