answerInlineQuery method
Future<bool>
answerInlineQuery(
- String inlineQueryId,
- List<
InlineQueryResult> results, { - int? cacheTime,
- bool? isPersonal,
- String? nextOffset,
- InlineQueryResultsButton? button,
Use this method to send answers to an inline query
On success, True is returned.
No more than 50 results per query are allowed.
Implementation
Future<bool> answerInlineQuery(
String inlineQueryId,
List<InlineQueryResult> results, {
int? cacheTime,
bool? isPersonal,
String? nextOffset,
InlineQueryResultsButton? button,
}) async {
var requestUrl = _apiUri('answerInlineQuery');
var body = <String, dynamic>{
'inline_query_id': inlineQueryId,
'results': jsonEncode(results),
'cache_time': cacheTime,
'is_personal': isPersonal,
'next_offset': nextOffset,
'button': button == null ? null : jsonEncode(button),
};
return await HttpClient.httpPost(requestUrl, body: body);
}