class Hamilton::Types::Game

Overview

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

Included Modules

Defined in:

types/game.cr

Constructors

Instance Method Summary

Instance methods inherited from class Reference

==(other : Hamilton::Any) ==

Instance methods inherited from class Object

===(other : Hamilton::Any) ===

Constructor Detail

def self.new(pull : JSON::PullParser) #

def self.new(params) #

def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

def self.new(**params) #

Instance Method Detail

def animation : Hamilton::Types::Animation | Nil #

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


def animation=(animation : Hamilton::Types::Animation | Nil) #

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


def description : String #

Description of the game.


def description=(description : String) #

Description of the game.


def non_nil_fields : Array(String) #

List of available non-nil fields.


def non_nil_fields=(non_nil_fields : Array(String)) #

List of available non-nil fields.


def photo : Array(PhotoSize) #

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


def photo=(photo : Array(PhotoSize)) #

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


def text : String | Nil #

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.


def text=(text : String | Nil) #

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.


def text_entities : Array(Hamilton::Types::MessageEntity) | Nil #

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


def text_entities=(text_entities : Array(Hamilton::Types::MessageEntity) | Nil) #

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


def title : String #

Title of the game.


def title=(title : String) #

Title of the game.