+19
-8
@@ -3,12 +3,20 @@ package tgapi
|
||||
// Game represents a game.
|
||||
// Since: Bot API 2.2
|
||||
type Game struct {
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Photo []PhotoSize `json:"photo"`
|
||||
Text string `json:"text,omitempty"`
|
||||
// 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 *Animation `json:"animation,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.
|
||||
@@ -19,7 +27,10 @@ type CallbackGame struct{}
|
||||
// Since: Bot API 2.2
|
||||
// See https://core.telegram.org/bots/api#gamehighscore
|
||||
type GameHighScore struct {
|
||||
Position int `json:"position"`
|
||||
User User `json:"user"`
|
||||
Score int `json:"score"`
|
||||
// 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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user