Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Commit

Permalink
Updated to Telegram Bot API 4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasss93 committed Apr 25, 2020
1 parent 104fb53 commit 651b40a
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 16 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.8] - 2020-04-26
### Added
- Added the ability to get an inexistent property from an object

### Changed
- Updated to Telegram Bot API 4.8

### Fixed
- Fixed `mb_str_split` method warning in PHP 7.4

## [1.7.1] - 2020-03-31
### Changed
- Updated to Telegram Bot API 4.7
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ext-curl": "*",
"ext-fileinfo": "*",
"ext-json": "*",
"netresearch/jsonmapper": "v1.4.*"
"netresearch/jsonmapper": "v2.1.*"
},
"autoload": {
"psr-4": {
Expand Down
22 changes: 13 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TelegramBot-PHP

[![API](https://img.shields.io/badge/Telegram%20Bot%20API-4.7%20--%20March%2030%2C%202020-blue.svg)](https://core.telegram.org/bots/api)
[![API](https://img.shields.io/badge/Telegram%20Bot%20API-4.8%20--%20April%2024%2C%202020-blue.svg)](https://core.telegram.org/bots/api)
![PHP](https://img.shields.io/badge/php-%3E%3D7.2-8892bf.svg)
![CURL](https://img.shields.io/badge/cURL-required-green.svg)

Expand Down Expand Up @@ -227,7 +227,12 @@ Changelog
All notable changes to this project will be documented [here](https://github.com/Lukasss93/telegrambot-php/blob/master/CHANGELOG.md).

### Recent changes
## [1.7.1] - 2020-03-31
## [1.8] - 2020-04-26
### Added
- Added the ability to get an inexistent property from an object

### Changed
- Updated to Telegram Bot API 4.7
- Improved PHPDocs
- Updated to Telegram Bot API 4.8

### Fixed
- Fixed `mb_str_split` method warning in PHP 7.4
9 changes: 9 additions & 0 deletions src/Constants/Emojis.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace TelegramBot\Constants;

class Emojis
{
public const DICE = '🎲';
public const DART = '🎯';
}
10 changes: 8 additions & 2 deletions src/Types/Dice.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
namespace TelegramBot\Types;

/**
* This object represents a dice with random value from 1 to 6.
* This object represents a dice with a random value from 1 to 6 for currently supported base emoji.
* (Yes, we're aware of the “proper” singular of die.
* But it's awkward, and we decided to help it change. One dice at a time!)
* @see https://core.telegram.org/bots/api#dice
*/
class Dice
{
/**
* Value of the dice, 1-6
* Emoji on which the dice throw animation is based
* @var string $emoji
*/
public $emoji;

/**
* Value of the dice, 1-6 for currently supported base emoji
* @var int $value
*/
public $value;
Expand Down
25 changes: 25 additions & 0 deletions src/Types/Poll.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,29 @@ class Poll
* @var int $correct_option_id
*/
public $correct_option_id;

/**
* Optional. Text that is shown when a user chooses an incorrect answer or taps
* on the lamp icon in a quiz-style poll, 0-200 characters
* @var string $explanation
*/
public $explanation;

/**
* Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation
* @var MessageEntity[] $explanation_entities
*/
public $explanation_entities;

/**
* Optional. Amount of time in seconds the poll will be active after creation
* @var int $open_period
*/
public $open_period;

/**
* Optional. Point in time (Unix timestamp) when the poll will be automatically closed
* @var int $close_date
*/
public $close_date;
}

0 comments on commit 651b40a

Please sign in to comment.