Move optional flag to a new line
parent
30c412fbe5
commit
e539815a49
23
types.go
23
types.go
|
@ -36,33 +36,42 @@ type Update struct {
|
||||||
// of the next update will be chosen randomly instead of sequentially.
|
// of the next update will be chosen randomly instead of sequentially.
|
||||||
UpdateID int `json:"update_id"`
|
UpdateID int `json:"update_id"`
|
||||||
// Message new incoming message of any kind — text, photo, sticker, etc.
|
// Message new incoming message of any kind — text, photo, sticker, etc.
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
Message *Message `json:"message"`
|
Message *Message `json:"message"`
|
||||||
// EditedMessage
|
// EditedMessage
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
EditedMessage *Message `json:"edited_message"`
|
EditedMessage *Message `json:"edited_message"`
|
||||||
// ChannelPost new version of a message that is known to the bot and was edited
|
// ChannelPost new version of a message that is known to the bot and was edited
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
ChannelPost *Message `json:"channel_post"`
|
ChannelPost *Message `json:"channel_post"`
|
||||||
// EditedChannelPost new incoming channel post of any kind — text, photo, sticker, etc.
|
// EditedChannelPost new incoming channel post of any kind — text, photo, sticker, etc.
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
EditedChannelPost *Message `json:"edited_channel_post"`
|
EditedChannelPost *Message `json:"edited_channel_post"`
|
||||||
// InlineQuery new incoming inline query
|
// InlineQuery new incoming inline query
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
InlineQuery *InlineQuery `json:"inline_query"`
|
InlineQuery *InlineQuery `json:"inline_query"`
|
||||||
// ChosenInlineResult is the result of an inline query
|
// ChosenInlineResult is the result of an inline query
|
||||||
// that was chosen by a user and sent to their chat partner.
|
// that was chosen by a user and sent to their chat partner.
|
||||||
// Please see our documentation on the feedback collecting
|
// Please see our documentation on the feedback collecting
|
||||||
// for details on how to enable these updates for your bot.
|
// for details on how to enable these updates for your bot.
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result"`
|
ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result"`
|
||||||
// CallbackQuery new incoming callback query
|
// CallbackQuery new incoming callback query
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
CallbackQuery *CallbackQuery `json:"callback_query"`
|
CallbackQuery *CallbackQuery `json:"callback_query"`
|
||||||
// ShippingQuery new incoming shipping query. Only for invoices with flexible price
|
// ShippingQuery new incoming shipping query. Only for invoices with flexible price
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
ShippingQuery *ShippingQuery `json:"shipping_query"`
|
ShippingQuery *ShippingQuery `json:"shipping_query"`
|
||||||
// PreCheckoutQuery new incoming pre-checkout query. Contains full information about checkout
|
// PreCheckoutQuery new incoming pre-checkout query. Contains full information about checkout
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query"`
|
PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query"`
|
||||||
}
|
}
|
||||||
|
@ -84,16 +93,20 @@ type User struct {
|
||||||
// FirstName user's or bot's first name
|
// FirstName user's or bot's first name
|
||||||
FirstName string `json:"first_name"`
|
FirstName string `json:"first_name"`
|
||||||
// LastName user's or bot's last name
|
// LastName user's or bot's last name
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
LastName string `json:"last_name"`
|
LastName string `json:"last_name"`
|
||||||
// UserName user's or bot's username
|
// UserName user's or bot's username
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
UserName string `json:"username"`
|
UserName string `json:"username"`
|
||||||
// LanguageCode IETF language tag of the user's language
|
// LanguageCode IETF language tag of the user's language
|
||||||
// more info: https://en.wikipedia.org/wiki/IETF_language_tag
|
// more info: https://en.wikipedia.org/wiki/IETF_language_tag
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
LanguageCode string `json:"language_code"`
|
LanguageCode string `json:"language_code"`
|
||||||
// IsBot true, if this user is a bot
|
// IsBot true, if this user is a bot
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
IsBot bool `json:"is_bot"`
|
IsBot bool `json:"is_bot"`
|
||||||
}
|
}
|
||||||
|
@ -143,31 +156,39 @@ type Chat struct {
|
||||||
// Type of chat, can be either “private”, “group”, “supergroup” or “channel”
|
// Type of chat, can be either “private”, “group”, “supergroup” or “channel”
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
// Title for supergroups, channels and group chats
|
// Title for supergroups, channels and group chats
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
// UserName for private chats, supergroups and channels if available
|
// UserName for private chats, supergroups and channels if available
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
UserName string `json:"username"`
|
UserName string `json:"username"`
|
||||||
// FirstName of the other party in a private chat
|
// FirstName of the other party in a private chat
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
FirstName string `json:"first_name"`
|
FirstName string `json:"first_name"`
|
||||||
// LastName of the other party in a private chat
|
// LastName of the other party in a private chat
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
LastName string `json:"last_name"`
|
LastName string `json:"last_name"`
|
||||||
// AllMembersAreAdmins
|
// AllMembersAreAdmins
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
AllMembersAreAdmins bool `json:"all_members_are_administrators"`
|
AllMembersAreAdmins bool `json:"all_members_are_administrators"`
|
||||||
// Photo is a chat photo
|
// Photo is a chat photo
|
||||||
Photo *ChatPhoto `json:"photo"`
|
Photo *ChatPhoto `json:"photo"`
|
||||||
// Description for groups, supergroups and channel chats
|
// Description for groups, supergroups and channel chats
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
Description string `json:"description,omitempty"`
|
Description string `json:"description,omitempty"`
|
||||||
// InviteLink is a chat invite link, for groups, supergroups and channel chats.
|
// InviteLink is a chat invite link, for groups, supergroups and channel chats.
|
||||||
// Each administrator in a chat generates their own invite links,
|
// Each administrator in a chat generates their own invite links,
|
||||||
// so the bot must first generate the link using exportChatInviteLink
|
// so the bot must first generate the link using exportChatInviteLink
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
InviteLink string `json:"invite_link,omitempty"`
|
InviteLink string `json:"invite_link,omitempty"`
|
||||||
// PinnedMessage Pinned message, for groups, supergroups and channels
|
// PinnedMessage Pinned message, for groups, supergroups and channels
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
PinnedMessage *Message `json:"pinned_message"`
|
PinnedMessage *Message `json:"pinned_message"`
|
||||||
}
|
}
|
||||||
|
@ -449,9 +470,11 @@ type MessageEntity struct {
|
||||||
// Length
|
// Length
|
||||||
Length int `json:"length"`
|
Length int `json:"length"`
|
||||||
// URL for “text_link” only, url that will be opened after user taps on the text
|
// URL for “text_link” only, url that will be opened after user taps on the text
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
// User for “text_mention” only, the mentioned user
|
// User for “text_mention” only, the mentioned user
|
||||||
|
//
|
||||||
// optional
|
// optional
|
||||||
User *User `json:"user"`
|
User *User `json:"user"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue