adding documentation to callback struct

This commit is contained in:
Steven Berlanga 2016-05-25 09:53:01 -04:00
parent 72e84f5ab5
commit 4b2c1f976c

View File

@ -152,12 +152,20 @@ type Location struct {
Latitude float32 `json:"latitude"` Latitude float32 `json:"latitude"`
} }
// Callback object represents a query from a callback button in an
// inline keyboard.
type Callback struct { type Callback struct {
ID string `json:"id"` ID string `json:"id"`
// For message sent to channels, Sender may be empty // For message sent to channels, Sender may be empty
Sender User `json:"from"` Sender User `json:"from"`
// Message will be set if the button that originated the query
// was attached to a message sent by a bot.
Message Message `json:"message"` Message Message `json:"message"`
Data string `json:"data"` // MessageID will be set if the button was attached to a message
// sent via the bot in inline mode.
MessageID string `json:"inline_message_id"`
Data string `json:"data"`
} }