FILE / ScuroNeko/Laniakea

tgapi/games_types.go

Исходный файл и его история в репозитории.
FILE dev
Files
ScuroNeko 29b208eeec
Golang lint / lint (push) Successful in 11m32s
(new): v1.2 release
2026-08-19 14:58:25 +03:00

37 lines
1.4 KiB
Go

package tgapi
// Game represents a game.
// Since: Bot API 2.2
type Game struct {
// Title Title of the game
Title string `json:"title"`
// Description Description of the game
Description string `json:"description"`
// Photo Photo that will be displayed in the game message in chats
Photo []PhotoSize `json:"photo"`
// 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.
Text string `json:"text,omitempty"`
// TextEntities Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
TextEntities []MessageEntity `json:"text_entities,omitempty"`
// Animation Optional. Animation that will be displayed in the game message in chats. Upload via BotFather.
Animation *Animation `json:"animation,omitempty"`
}
// CallbackGame is a placeholder for the future use of callback games.
// Since: Bot API 2.2
type CallbackGame struct{}
// GameHighScore represents one row in a game high score table.
// Since: Bot API 2.2
// See https://core.telegram.org/bots/api#gamehighscore
type GameHighScore struct {
// Position Position in high score table for the game
Position int `json:"position"`
// User User
User User `json:"user"`
// Score Score
Score int `json:"score"`
}