class

Tourmaline::Game

Inherits JSON::Serializable / Reference / Object

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

Constructors

new(title : String, description : String, photo : Array(Tourmaline::PhotoSize) = [] of Tourmaline::PhotoSize, text : String | Nil = nil, text_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, animation : Tourmaline::Animation | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

animation

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

Source
animation=(animation : Tourmaline::Animation | Nil)

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

Source
description

Description of the game

Source
description=(description : String)

Description of the game

Source
photo

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

Source
photo=(photo : Array(Tourmaline::PhotoSize))

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

Source
text

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.

Source
text=(text : String | Nil)

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.

Source
text_entities

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

Source
text_entities=(text_entities : Array(Tourmaline::MessageEntity))

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

Source
title

Title of the game

Source
title=(title : String)

Title of the game

Source