1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* This file is part of the TelegramBot package. |
4
|
|
|
* |
5
|
|
|
* (c) Avtandil Kikabidze aka LONGMAN <[email protected]> |
6
|
|
|
* |
7
|
|
|
* For the full copyright and license information, please view the LICENSE |
8
|
|
|
* file that was distributed with this source code. |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace Longman\TelegramBot\Entities\Games; |
12
|
|
|
|
13
|
|
|
use Longman\TelegramBot\Entities\Animation; |
14
|
|
|
use Longman\TelegramBot\Entities\Entity; |
15
|
|
|
use Longman\TelegramBot\Entities\MessageEntity; |
16
|
|
|
use Longman\TelegramBot\Entities\PhotoSize; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* Class Game |
20
|
|
|
* |
21
|
|
|
* This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers. |
22
|
|
|
* |
23
|
|
|
* @link https://core.telegram.org/bots/api#game |
24
|
|
|
* |
25
|
|
|
* @method string getTitle() Title of the game |
26
|
|
|
* @method string getDescription() Description of the game |
27
|
|
|
* @method PhotoSize[] getPhoto() Photo that will be displayed in the game message in chats. |
28
|
|
|
* @method string getText() Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters. |
29
|
|
|
* @method MessageEntity[] getTextEntities() Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc. |
30
|
|
|
* @method Animation getAnimation() Optional. Animation that will be displayed in the game message in chats. Upload via BotFather |
31
|
|
|
**/ |
32
|
|
|
class Game extends Entity |
33
|
|
|
{ |
34
|
|
|
/** |
35
|
|
|
* {@inheritdoc} |
36
|
|
|
*/ |
37
|
|
|
protected function subEntities() |
38
|
|
|
{ |
39
|
|
|
return [ |
40
|
|
|
'photo' => [PhotoSize::class], |
41
|
|
|
'text_entities' => [MessageEntity::class], |
42
|
|
|
'animation' => Animation::class, |
43
|
|
|
]; |
44
|
|
|
} |
45
|
|
|
} |
46
|
|
|
|