Skip to content

Commit 4536975

Browse files
Add inline query result audio types documentation
1 parent 11023a0 commit 4536975

File tree

1 file changed

+94
-23
lines changed

1 file changed

+94
-23
lines changed

types.go

Lines changed: 94 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,37 +1162,108 @@ type InlineQueryResultCachedVideo struct {
11621162

11631163
// InlineQueryResultCachedSticker is an inline query response with cached sticker.
11641164
type InlineQueryResultCachedSticker struct {
1165-
Type string `json:"type"` // required
1166-
ID string `json:"id"` // required
1167-
StickerID string `json:"sticker_file_id"` // required
1168-
Title string `json:"title"` // required
1169-
ParseMode string `json:"parse_mode"`
1170-
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
1171-
InputMessageContent interface{} `json:"input_message_content,omitempty"`
1165+
// Type of the result, must be sticker
1166+
//
1167+
// required
1168+
Type string `json:"type"`
1169+
// ID unique identifier for this result, 1-64 bytes
1170+
//
1171+
// required
1172+
ID string `json:"id"`
1173+
// StickerID a valid file identifier of the sticker
1174+
//
1175+
// required
1176+
StickerID string `json:"sticker_file_id"`
1177+
// Title is a title
1178+
Title string `json:"title"`
1179+
// ParseMode mode for parsing entities in the video caption.
1180+
// See formatting options for more details
1181+
// (https://core.telegram.org/bots/api#formatting-options).
1182+
//
1183+
// optional
1184+
ParseMode string `json:"parse_mode"`
1185+
// ReplyMarkup inline keyboard attached to the message
1186+
//
1187+
// optional
1188+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
1189+
// InputMessageContent content of the message to be sent instead of the sticker
1190+
//
1191+
// optional
1192+
InputMessageContent interface{} `json:"input_message_content,omitempty"`
11721193
}
11731194

11741195
// InlineQueryResultAudio is an inline query response audio.
11751196
type InlineQueryResultAudio struct {
1176-
Type string `json:"type"` // required
1177-
ID string `json:"id"` // required
1178-
URL string `json:"audio_url"` // required
1179-
Title string `json:"title"` // required
1180-
Caption string `json:"caption"`
1181-
Performer string `json:"performer"`
1182-
Duration int `json:"audio_duration"`
1183-
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
1184-
InputMessageContent interface{} `json:"input_message_content,omitempty"`
1197+
// Type of the result, must be audio
1198+
//
1199+
// required
1200+
Type string `json:"type"`
1201+
// ID unique identifier for this result, 1-64 bytes
1202+
//
1203+
// required
1204+
ID string `json:"id"`
1205+
// URL a valid url for the audio file
1206+
//
1207+
// required
1208+
URL string `json:"audio_url"`
1209+
// Title is a title
1210+
//
1211+
// required
1212+
Title string `json:"title"`
1213+
// Caption 0-1024 characters after entities parsing
1214+
//
1215+
// optional
1216+
Caption string `json:"caption"`
1217+
// Performer is a performer
1218+
//
1219+
// optional
1220+
Performer string `json:"performer"`
1221+
// Duration audio duration in seconds
1222+
//
1223+
// optional
1224+
Duration int `json:"audio_duration"`
1225+
// ReplyMarkup inline keyboard attached to the message
1226+
//
1227+
// optional
1228+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
1229+
// InputMessageContent content of the message to be sent instead of the audio
1230+
//
1231+
// optional
1232+
InputMessageContent interface{} `json:"input_message_content,omitempty"`
11851233
}
11861234

11871235
// InlineQueryResultCachedAudio is an inline query response with cached audio.
11881236
type InlineQueryResultCachedAudio struct {
1189-
Type string `json:"type"` // required
1190-
ID string `json:"id"` // required
1191-
AudioID string `json:"audio_file_id"` // required
1192-
Caption string `json:"caption"`
1193-
ParseMode string `json:"parse_mode"`
1194-
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
1195-
InputMessageContent interface{} `json:"input_message_content,omitempty"`
1237+
// Type of the result, must be audio
1238+
//
1239+
// required
1240+
Type string `json:"type"`
1241+
// ID unique identifier for this result, 1-64 bytes
1242+
//
1243+
// required
1244+
ID string `json:"id"`
1245+
// AudioID a valid file identifier for the audio file
1246+
//
1247+
// required
1248+
AudioID string `json:"audio_file_id"`
1249+
// Caption 0-1024 characters after entities parsing
1250+
//
1251+
// optional
1252+
Caption string `json:"caption"`
1253+
// ParseMode mode for parsing entities in the video caption.
1254+
// See formatting options for more details
1255+
// (https://core.telegram.org/bots/api#formatting-options).
1256+
//
1257+
// optional
1258+
ParseMode string `json:"parse_mode"`
1259+
// ReplyMarkup inline keyboard attached to the message
1260+
//
1261+
// optional
1262+
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
1263+
// InputMessageContent content of the message to be sent instead of the audio
1264+
//
1265+
// optional
1266+
InputMessageContent interface{} `json:"input_message_content,omitempty"`
11961267
}
11971268

11981269
// InlineQueryResultVoice is an inline query response voice.

0 commit comments

Comments
 (0)