class Tourmaline::Game
inherits Reference
#
This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
Included modules
JSON::Serializable
Constructors#
.new(title, description, photo : Array(Tourmaline::PhotoSize) = [] of Tourmaline::PhotoSize, text : String? = nil, text_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, animation : Tourmaline::Animation? = nil)
#
(title, description, photo : Array(Tourmaline::PhotoSize) = [] of Tourmaline::PhotoSize, text : String? = nil, text_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, animation : Tourmaline::Animation? = nil)
Methods#
#animation : Tourmaline::Animation?
#
: Tourmaline::Animation?
Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
#animation=(animation : Tourmaline::Animation?)
#
(animation : Tourmaline::Animation?)
Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
#photo : Array(Tourmaline::PhotoSize)
#
: Array(Tourmaline::PhotoSize)
Photo that will be displayed in the game message in chats.
#photo=(photo : Array(Tourmaline::PhotoSize))
#
(photo : Array(Tourmaline::PhotoSize))
Photo that will be displayed in the game message in chats.
#text : String?
#
: String?
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.
#text=(text : String?)
#
(text : String?)
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.
#text_entities : Array(Tourmaline::MessageEntity)
#
: Array(Tourmaline::MessageEntity)
Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
#text_entities=(text_entities : Array(Tourmaline::MessageEntity))
#
(text_entities : Array(Tourmaline::MessageEntity))
Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.