Skip to content

Commit 5875a46

Browse files
Add game type documentation
1 parent d2ea97f commit 5875a46

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

types.go

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,12 +1019,27 @@ func (chat ChatMember) WasKicked() bool { return chat.Status == "kicked" }
10191019

10201020
// Game is a game within Telegram.
10211021
type Game struct {
1022-
Title string `json:"title"`
1023-
Description string `json:"description"`
1024-
Photo []PhotoSize `json:"photo"`
1025-
Text string `json:"text"`
1022+
// Title of the game
1023+
Title string `json:"title"`
1024+
// Description of the game
1025+
Description string `json:"description"`
1026+
// Photo that will be displayed in the game message in chats.
1027+
Photo []PhotoSize `json:"photo"`
1028+
// Text a brief description of the game or high scores included in the game message.
1029+
// Can be automatically edited to include current high scores for the game
1030+
// when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
1031+
//
1032+
// optional
1033+
Text string `json:"text"`
1034+
// TextEntities special entities that appear in text, such as usernames, URLs, bot commands, etc.
1035+
//
1036+
// optional
10261037
TextEntities []MessageEntity `json:"text_entities"`
1027-
Animation Animation `json:"animation"`
1038+
// Animation animation that will be displayed in the game message in chats.
1039+
// Upload via BotFather (https://t.me/botfather).
1040+
//
1041+
// optional
1042+
Animation Animation `json:"animation"`
10281043
}
10291044

10301045
// Animation is a GIF animation demonstrating the game.

0 commit comments

Comments
 (0)