class Telegram::API::Game

Overview

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

Defined in:

telegram/api/generated/types.cr

Constructors

Instance Method Summary

Instance methods inherited from class Telegram::API::Type

==(other) ==, client client

Constructor methods inherited from class Telegram::API::Type

new(pull : JSON::PullParser) new

Constructor Detail

def self.new(title : String, description : String, photo : Array(PhotoSize) = Array(PhotoSize).new, text : String | Nil = nil, animation : Animation | Nil = nil, text_entities : Array(MessageEntity) = Array(MessageEntity).new) #

[View source]
def self.new(pull : JSON::PullParser) #

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


[View source]

Instance Method Detail

def animation : Animation | Nil #

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


[View source]
def animation=(animation : Animation | Nil) #

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


[View source]
def description : String #

Description of the game


[View source]
def description=(description : String) #

Description of the game


[View source]
def photo : Array(PhotoSize) #

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


[View source]
def photo=(photo : Array(PhotoSize)) #

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


[View source]
def 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.


[View source]
def 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.


[View source]
def text_entities : Array(MessageEntity) #

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


[View source]
def text_entities=(text_entities : Array(MessageEntity)) #

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


[View source]
def title : String #

Title of the game


[View source]
def title=(title : String) #

Title of the game


[View source]