Game

@Serializable
data class Game(val title: String, val description: String, val photo: List<PhotoSize>, val text: String? = null, val textEntities: List<MessageEntity>? = null, val animation: Animation? = null)

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

Api reference

Constructors

Link copied to clipboard
constructor(title: String, description: String, photo: List<PhotoSize>, text: String? = null, textEntities: List<MessageEntity>? = null, animation: Animation? = null)

Properties

Link copied to clipboard
val animation: Animation? = null

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

Link copied to clipboard

Description of the game

Link copied to clipboard

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

Link copied to clipboard
val text: String? = null

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.

Link copied to clipboard

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

Link copied to clipboard

Title of the game