@@ -36,33 +36,42 @@ type Update struct {
3636 // of the next update will be chosen randomly instead of sequentially.
3737 UpdateID int `json:"update_id"`
3838 // Message new incoming message of any kind — text, photo, sticker, etc.
39+ //
3940 // optional
4041 Message * Message `json:"message"`
4142 // EditedMessage
43+ //
4244 // optional
4345 EditedMessage * Message `json:"edited_message"`
4446 // ChannelPost new version of a message that is known to the bot and was edited
47+ //
4548 // optional
4649 ChannelPost * Message `json:"channel_post"`
4750 // EditedChannelPost new incoming channel post of any kind — text, photo, sticker, etc.
51+ //
4852 // optional
4953 EditedChannelPost * Message `json:"edited_channel_post"`
5054 // InlineQuery new incoming inline query
55+ //
5156 // optional
5257 InlineQuery * InlineQuery `json:"inline_query"`
5358 // ChosenInlineResult is the result of an inline query
5459 // that was chosen by a user and sent to their chat partner.
5560 // Please see our documentation on the feedback collecting
5661 // for details on how to enable these updates for your bot.
62+ //
5763 // optional
5864 ChosenInlineResult * ChosenInlineResult `json:"chosen_inline_result"`
5965 // CallbackQuery new incoming callback query
66+ //
6067 // optional
6168 CallbackQuery * CallbackQuery `json:"callback_query"`
6269 // ShippingQuery new incoming shipping query. Only for invoices with flexible price
70+ //
6371 // optional
6472 ShippingQuery * ShippingQuery `json:"shipping_query"`
6573 // PreCheckoutQuery new incoming pre-checkout query. Contains full information about checkout
74+ //
6675 // optional
6776 PreCheckoutQuery * PreCheckoutQuery `json:"pre_checkout_query"`
6877}
@@ -84,16 +93,20 @@ type User struct {
8493 // FirstName user's or bot's first name
8594 FirstName string `json:"first_name"`
8695 // LastName user's or bot's last name
96+ //
8797 // optional
8898 LastName string `json:"last_name"`
8999 // UserName user's or bot's username
100+ //
90101 // optional
91102 UserName string `json:"username"`
92103 // LanguageCode IETF language tag of the user's language
93104 // more info: https://en.wikipedia.org/wiki/IETF_language_tag
105+ //
94106 // optional
95107 LanguageCode string `json:"language_code"`
96108 // IsBot true, if this user is a bot
109+ //
97110 // optional
98111 IsBot bool `json:"is_bot"`
99112}
@@ -143,31 +156,39 @@ type Chat struct {
143156 // Type of chat, can be either “private”, “group”, “supergroup” or “channel”
144157 Type string `json:"type"`
145158 // Title for supergroups, channels and group chats
159+ //
146160 // optional
147161 Title string `json:"title"`
148162 // UserName for private chats, supergroups and channels if available
163+ //
149164 // optional
150165 UserName string `json:"username"`
151166 // FirstName of the other party in a private chat
167+ //
152168 // optional
153169 FirstName string `json:"first_name"`
154170 // LastName of the other party in a private chat
171+ //
155172 // optional
156173 LastName string `json:"last_name"`
157174 // AllMembersAreAdmins
175+ //
158176 // optional
159177 AllMembersAreAdmins bool `json:"all_members_are_administrators"`
160178 // Photo is a chat photo
161179 Photo * ChatPhoto `json:"photo"`
162180 // Description for groups, supergroups and channel chats
181+ //
163182 // optional
164183 Description string `json:"description,omitempty"`
165184 // InviteLink is a chat invite link, for groups, supergroups and channel chats.
166185 // Each administrator in a chat generates their own invite links,
167186 // so the bot must first generate the link using exportChatInviteLink
187+ //
168188 // optional
169189 InviteLink string `json:"invite_link,omitempty"`
170190 // PinnedMessage Pinned message, for groups, supergroups and channels
191+ //
171192 // optional
172193 PinnedMessage * Message `json:"pinned_message"`
173194}
@@ -449,9 +470,11 @@ type MessageEntity struct {
449470 // Length
450471 Length int `json:"length"`
451472 // URL for “text_link” only, url that will be opened after user taps on the text
473+ //
452474 // optional
453475 URL string `json:"url"`
454476 // User for “text_mention” only, the mentioned user
477+ //
455478 // optional
456479 User * User `json:"user"`
457480}
0 commit comments