Add update type documentation
parent
26a3c95421
commit
30c412fbe5
46
types.go
46
types.go
|
@ -27,16 +27,44 @@ type ResponseParameters struct {
|
||||||
|
|
||||||
// Update is an update response, from GetUpdates.
|
// Update is an update response, from GetUpdates.
|
||||||
type Update struct {
|
type Update struct {
|
||||||
UpdateID int `json:"update_id"`
|
// UpdateID is the update's unique identifier.
|
||||||
Message *Message `json:"message"`
|
// Update identifiers start from a certain positive number and increase sequentially.
|
||||||
EditedMessage *Message `json:"edited_message"`
|
// This ID becomes especially handy if you're using Webhooks,
|
||||||
ChannelPost *Message `json:"channel_post"`
|
// since it allows you to ignore repeated updates or to restore
|
||||||
EditedChannelPost *Message `json:"edited_channel_post"`
|
// the correct update sequence, should they get out of order.
|
||||||
InlineQuery *InlineQuery `json:"inline_query"`
|
// If there are no new updates for at least a week, then identifier
|
||||||
|
// of the next update will be chosen randomly instead of sequentially.
|
||||||
|
UpdateID int `json:"update_id"`
|
||||||
|
// Message new incoming message of any kind — text, photo, sticker, etc.
|
||||||
|
// optional
|
||||||
|
Message *Message `json:"message"`
|
||||||
|
// EditedMessage
|
||||||
|
// optional
|
||||||
|
EditedMessage *Message `json:"edited_message"`
|
||||||
|
// ChannelPost new version of a message that is known to the bot and was edited
|
||||||
|
// optional
|
||||||
|
ChannelPost *Message `json:"channel_post"`
|
||||||
|
// EditedChannelPost new incoming channel post of any kind — text, photo, sticker, etc.
|
||||||
|
// optional
|
||||||
|
EditedChannelPost *Message `json:"edited_channel_post"`
|
||||||
|
// InlineQuery new incoming inline query
|
||||||
|
// optional
|
||||||
|
InlineQuery *InlineQuery `json:"inline_query"`
|
||||||
|
// ChosenInlineResult is the result of an inline query
|
||||||
|
// that was chosen by a user and sent to their chat partner.
|
||||||
|
// Please see our documentation on the feedback collecting
|
||||||
|
// for details on how to enable these updates for your bot.
|
||||||
|
// optional
|
||||||
ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result"`
|
ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result"`
|
||||||
CallbackQuery *CallbackQuery `json:"callback_query"`
|
// CallbackQuery new incoming callback query
|
||||||
ShippingQuery *ShippingQuery `json:"shipping_query"`
|
// optional
|
||||||
PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query"`
|
CallbackQuery *CallbackQuery `json:"callback_query"`
|
||||||
|
// ShippingQuery new incoming shipping query. Only for invoices with flexible price
|
||||||
|
// optional
|
||||||
|
ShippingQuery *ShippingQuery `json:"shipping_query"`
|
||||||
|
// PreCheckoutQuery new incoming pre-checkout query. Contains full information about checkout
|
||||||
|
// optional
|
||||||
|
PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdatesChannel is the channel for getting updates.
|
// UpdatesChannel is the channel for getting updates.
|
||||||
|
|
Loading…
Reference in New Issue