Game

data class Game(title: String, description: String, photo: List<PhotoSize>, text: String?, textEntities: List<MessageEntity>, animation: Animation?)

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

Parameters

title

Title of the game

description

Description of the game

photo

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

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.

textEntities

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

animation

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

Constructors

Game
Link copied to clipboard
common
fun Game(title: String, description: String, photo: List<PhotoSize> = emptyList(), text: String? = null, textEntities: List<MessageEntity> = emptyList(), animation: Animation? = null)
Title of the game

Functions

component1
Link copied to clipboard
common
operator fun component1(): String
component2
Link copied to clipboard
common
operator fun component2(): String
component3
Link copied to clipboard
common
operator fun component3(): List<PhotoSize>
component4
Link copied to clipboard
common
operator fun component4(): String?
component5
Link copied to clipboard
common
operator fun component5(): List<MessageEntity>
component6
Link copied to clipboard
common
operator fun component6(): Animation?
copy
Link copied to clipboard
common
fun copy(title: String, description: String, photo: List<PhotoSize> = emptyList(), text: String? = null, textEntities: List<MessageEntity> = emptyList(), animation: Animation? = null): Game
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

animation
Link copied to clipboard
common
val animation: Animation? = null
Optional.
description
Link copied to clipboard
common
val description: String
Description of the game
photo
Link copied to clipboard
common
val photo: List<PhotoSize>
Photo that will be displayed in the game message in chats.
text
Link copied to clipboard
common
val text: String? = null
Optional.
textEntities
Link copied to clipboard
common
val textEntities: List<MessageEntity>
Optional.
title
Link copied to clipboard
common
val title: String
Title of the game