mirror of
https://github.com/tucnak/telebot
synced 2024-11-11 01:10:39 +00:00
d8b2ca1983
- Malformed JSON field tags, OMG fixed - Making linters happy - Foursquare_id -> FoursquareID, fuck BC
85 lines
2.7 KiB
Go
85 lines
2.7 KiB
Go
package telebot
|
|
|
|
// InputMessageContent objects represent the content of a message to be sent
|
|
// as a result of an inline query.
|
|
// See also: https://core.telegram.org/bots/api#inputmessagecontent
|
|
type InputMessageContent interface {
|
|
IsInputMessageContent() bool
|
|
}
|
|
|
|
// InputTextMessageContent represents the content of a text message to be
|
|
// sent as the result of an inline query.
|
|
// See also: https://core.telegram.org/bots/api#inputtextmessagecontent
|
|
type InputTextMessageContent struct {
|
|
// Text of the message to be sent, 1-4096 characters.
|
|
Text string `json:"message_text"`
|
|
|
|
// Optional. Send Markdown or HTML, if you want Telegram apps to show
|
|
// bold, italic, fixed-width text or inline URLs in your bot's message.
|
|
ParseMode string `json:"parse_mode,omitempty"`
|
|
|
|
// Optional. Disables link previews for links in the sent message.
|
|
DisablePreview bool `json:"disable_web_page_preview"`
|
|
}
|
|
|
|
func (input *InputTextMessageContent) IsInputMessageContent() bool {
|
|
return true
|
|
}
|
|
|
|
// InputLocationMessageContent represents the content of a location message
|
|
// to be sent as the result of an inline query.
|
|
// See also: https://core.telegram.org/bots/api#inputlocationmessagecontent
|
|
type InputLocationMessageContent struct {
|
|
// Latitude of the location in degrees.
|
|
Latitude float32 `json:"latitude"`
|
|
|
|
// Longitude of the location in degrees.
|
|
Longitude float32 `json:"longitude"`
|
|
}
|
|
|
|
func (input *InputLocationMessageContent) IsInputMessageContent() bool {
|
|
return true
|
|
}
|
|
|
|
// InputVenueMessageContent represents the content of a venue message to
|
|
// be sent as the result of an inline query.
|
|
// See also: https://core.telegram.org/bots/api#inputvenuemessagecontent
|
|
type InputVenueMessageContent struct {
|
|
// Latitude of the location in degrees.
|
|
Latitude float32 `json:"latitude"`
|
|
|
|
// Longitude of the location in degrees.
|
|
Longitude float32 `json:"longitude"`
|
|
|
|
// Name of the venue.
|
|
Title string `json:"title"`
|
|
|
|
// Address of the venue.
|
|
Address string `json:"address"`
|
|
|
|
// Optional. Foursquare identifier of the venue, if known.
|
|
FoursquareID string `json:"foursquare_id,omitempty"`
|
|
}
|
|
|
|
func (input *InputVenueMessageContent) IsInputMessageContent() bool {
|
|
return true
|
|
}
|
|
|
|
// InputContactMessageContent represents the content of a contact
|
|
// message to be sent as the result of an inline query.
|
|
// See also: https://core.telegram.org/bots/api#inputcontactmessagecontent
|
|
type InputContactMessageContent struct {
|
|
// Contact's phone number.
|
|
PhoneNumber string `json:"phone_number"`
|
|
|
|
// Contact's first name.
|
|
FirstName string `json:"first_name"`
|
|
|
|
// Optional. Contact's last name.
|
|
LastName string `json:"last_name,omitempty"`
|
|
}
|
|
|
|
func (input *InputContactMessageContent) IsInputMessageContent() bool {
|
|
return true
|
|
}
|