Skip to content

GramIO API Reference / @gramio/contexts/dist / Game

Class: Game ​

Defined in: contexts/index.d.ts:1909

This object represents a game.

Constructors ​

Constructor ​

new Game(payload): Game

Defined in: contexts/index.d.ts:1911

Parameters ​

ParameterType
payloadTelegramGame

Returns ​

Game

Properties ​

PropertyTypeDefined in
payloadTelegramGamecontexts/index.d.ts:1910

Accessors ​

[toStringTag] ​

Get Signature ​

get [toStringTag](): string

Defined in: contexts/index.d.ts:1913

MDN

Returns ​

string


animation ​

Get Signature ​

get animation(): AnimationAttachment

Defined in: contexts/index.d.ts:1936

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

Returns ​

AnimationAttachment


description ​

Get Signature ​

get description(): string

Defined in: contexts/index.d.ts:1917

Description of the game

Returns ​

string


photo ​

Get Signature ​

get photo(): PhotoSize[]

Defined in: contexts/index.d.ts:1919

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

Returns ​

PhotoSize[]


text ​

Get Signature ​

get text(): string

Defined in: contexts/index.d.ts:1926

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.

Returns ​

string


textEntities ​

Get Signature ​

get textEntities(): MessageEntity[]

Defined in: contexts/index.d.ts:1931

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

Returns ​

MessageEntity[]


title ​

Get Signature ​

get title(): string

Defined in: contexts/index.d.ts:1915

Title of the game

Returns ​

string