Add inline query result voice types documentation

bot-api-6.1
Ilya Kaznacheev 2020-10-24 21:16:28 +03:00
parent 45369759f1
commit 515002232b
No known key found for this signature in database
GPG Key ID: 7E2C1D8A4AB37D50
1 changed files with 66 additions and 16 deletions

View File

@ -1268,25 +1268,75 @@ type InlineQueryResultCachedAudio struct {
// InlineQueryResultVoice is an inline query response voice. // InlineQueryResultVoice is an inline query response voice.
type InlineQueryResultVoice struct { type InlineQueryResultVoice struct {
Type string `json:"type"` // required // Type of the result, must be voice
ID string `json:"id"` // required //
URL string `json:"voice_url"` // required // required
Title string `json:"title"` // required Type string `json:"type"`
// ID unique identifier for this result, 1-64 bytes
//
// required
ID string `json:"id"`
// URL a valid URL for the voice recording
//
// required
URL string `json:"voice_url"`
// Title recording title
//
// required
Title string `json:"title"`
// Caption 0-1024 characters after entities parsing
//
// optional
Caption string `json:"caption"` Caption string `json:"caption"`
// Duration recording duration in seconds
//
// optional
Duration int `json:"voice_duration"` Duration int `json:"voice_duration"`
// ReplyMarkup inline keyboard attached to the message
//
// optional
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// InputMessageContent content of the message to be sent instead of the voice recording
//
// optional
InputMessageContent interface{} `json:"input_message_content,omitempty"` InputMessageContent interface{} `json:"input_message_content,omitempty"`
} }
// InlineQueryResultCachedVoice is an inline query response with cached voice. // InlineQueryResultCachedVoice is an inline query response with cached voice.
type InlineQueryResultCachedVoice struct { type InlineQueryResultCachedVoice struct {
Type string `json:"type"` // required // Type of the result, must be voice
ID string `json:"id"` // required //
VoiceID string `json:"voice_file_id"` // required // required
Title string `json:"title"` // required Type string `json:"type"`
// ID unique identifier for this result, 1-64 bytes
//
// required
ID string `json:"id"`
// VoiceID a valid file identifier for the voice message
//
// required
VoiceID string `json:"voice_file_id"`
// Title voice message title
//
// required
Title string `json:"title"`
// Caption 0-1024 characters after entities parsing
//
// optional
Caption string `json:"caption"` Caption string `json:"caption"`
// ParseMode mode for parsing entities in the video caption.
// See formatting options for more details
// (https://core.telegram.org/bots/api#formatting-options).
//
// optional
ParseMode string `json:"parse_mode"` ParseMode string `json:"parse_mode"`
// ReplyMarkup inline keyboard attached to the message
//
// optional
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// InputMessageContent content of the message to be sent instead of the voice message
//
// optional
InputMessageContent interface{} `json:"input_message_content,omitempty"` InputMessageContent interface{} `json:"input_message_content,omitempty"`
} }