Skip to content

Commit 25c494b

Browse files
Add input message content types documentation
1 parent 536eb52 commit 25c494b

File tree

1 file changed

+34
-11
lines changed

1 file changed

+34
-11
lines changed

types.go

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,34 +1578,57 @@ type ChosenInlineResult struct {
15781578
// InputTextMessageContent contains text for displaying
15791579
// as an inline query result.
15801580
type InputTextMessageContent struct {
1581-
Text string `json:"message_text"`
1582-
ParseMode string `json:"parse_mode"`
1583-
DisableWebPagePreview bool `json:"disable_web_page_preview"`
1581+
// Text of the message to be sent, 1-4096 characters
1582+
Text string `json:"message_text"`
1583+
// ParseMode mode for parsing entities in the message text.
1584+
// See formatting options for more details
1585+
// (https://core.telegram.org/bots/api#formatting-options).
1586+
//
1587+
// optional
1588+
ParseMode string `json:"parse_mode"`
1589+
// DisableWebPagePreview disables link previews for links in the sent message
1590+
//
1591+
// optional
1592+
DisableWebPagePreview bool `json:"disable_web_page_preview"`
15841593
}
15851594

15861595
// InputLocationMessageContent contains a location for displaying
15871596
// as an inline query result.
15881597
type InputLocationMessageContent struct {
1589-
Latitude float64 `json:"latitude"`
1598+
// Latitude of the location in degrees
1599+
Latitude float64 `json:"latitude"`
1600+
// Longitude of the location in degrees
15901601
Longitude float64 `json:"longitude"`
15911602
}
15921603

15931604
// InputVenueMessageContent contains a venue for displaying
15941605
// as an inline query result.
15951606
type InputVenueMessageContent struct {
1596-
Latitude float64 `json:"latitude"`
1597-
Longitude float64 `json:"longitude"`
1598-
Title string `json:"title"`
1599-
Address string `json:"address"`
1600-
FoursquareID string `json:"foursquare_id"`
1607+
// Latitude of the venue in degrees
1608+
Latitude float64 `json:"latitude"`
1609+
// Longitude of the venue in degrees
1610+
Longitude float64 `json:"longitude"`
1611+
// Title name of the venue
1612+
Title string `json:"title"`
1613+
// Address of the venue
1614+
Address string `json:"address"`
1615+
// FoursquareID foursquare identifier of the venue, if known
1616+
//
1617+
// optional
1618+
FoursquareID string `json:"foursquare_id"`
16011619
}
16021620

16031621
// InputContactMessageContent contains a contact for displaying
16041622
// as an inline query result.
16051623
type InputContactMessageContent struct {
1624+
// PhoneNumber contact's phone number
16061625
PhoneNumber string `json:"phone_number"`
1607-
FirstName string `json:"first_name"`
1608-
LastName string `json:"last_name"`
1626+
// FirstName contact's first name
1627+
FirstName string `json:"first_name"`
1628+
// LastName contact's last name
1629+
//
1630+
// optional
1631+
LastName string `json:"last_name"`
16091632
}
16101633

16111634
// Invoice contains basic information about an invoice.

0 commit comments

Comments
 (0)