class Game

This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.

Methods

__construct(string $title, string $description, PhotoSize[] $photo, string|null $text = null, MessageEntity[]|null $text_entities = null, Animation|null $animation = null)

No description

string
getTitle()

Title of the game.

string
getDescription()

Description of the game.

array
getPhoto()

Photo that will be displayed in the game message in chats.

string|null
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.

array|null
getTextEntities()

Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.

Animation|null
getAnimation()

Optional. Animation that will be displayed in the game message in chats. Upload via BotFather.

Details

at line 18
__construct(string $title, string $description, PhotoSize[] $photo, string|null $text = null, MessageEntity[]|null $text_entities = null, Animation|null $animation = null)

No description

Parameters

string $title
string $description
PhotoSize[] $photo
string|null $text
MessageEntity[]|null $text_entities
Animation|null $animation

at line 31
string getTitle()

Title of the game.

Return Value

string

at line 39
string getDescription()

Description of the game.

Return Value

string

at line 49
array getPhoto()

Photo that will be displayed in the game message in chats.

Return Value

array

at line 57
string|null 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.

Return Value

string|null

at line 67
array|null getTextEntities()

Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.

Return Value

array|null

at line 75
Animation|null getAnimation()

Optional. Animation that will be displayed in the game message in chats. Upload via BotFather.

Return Value

Animation|null