From 515002232befb8ad10c86f31de61daa91f81fe29 Mon Sep 17 00:00:00 2001 From: Ilya Kaznacheev Date: Sat, 24 Oct 2020 21:16:28 +0300 Subject: [PATCH] Add inline query result voice types documentation --- types.go | 82 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 16 deletions(-) diff --git a/types.go b/types.go index b80eea8..38b8bab 100644 --- a/types.go +++ b/types.go @@ -1268,26 +1268,76 @@ type InlineQueryResultCachedAudio struct { // InlineQueryResultVoice is an inline query response voice. type InlineQueryResultVoice struct { - Type string `json:"type"` // required - ID string `json:"id"` // required - URL string `json:"voice_url"` // required - Title string `json:"title"` // required - Caption string `json:"caption"` - Duration int `json:"voice_duration"` - ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` - InputMessageContent interface{} `json:"input_message_content,omitempty"` + // Type of the result, must be voice + // + // 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"` + // Duration recording duration in seconds + // + // optional + Duration int `json:"voice_duration"` + // ReplyMarkup inline keyboard attached to the message + // + // optional + 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"` } // InlineQueryResultCachedVoice is an inline query response with cached voice. type InlineQueryResultCachedVoice struct { - Type string `json:"type"` // required - ID string `json:"id"` // required - VoiceID string `json:"voice_file_id"` // required - Title string `json:"title"` // required - Caption string `json:"caption"` - ParseMode string `json:"parse_mode"` - ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` - InputMessageContent interface{} `json:"input_message_content,omitempty"` + // Type of the result, must be voice + // + // 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"` + // 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"` + // ReplyMarkup inline keyboard attached to the message + // + // optional + 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"` } // InlineQueryResultDocument is an inline query response document.