answerInlineQueryПоддерживается
Use this method to send answers to an inline query. On success, True is returned.
No more than 50 results per query are allowed.
Особенности StaticGram
all 20 InlineQueryResult types, InputText/Location/Venue/Contact content (Invoice → 400 INVOICE_CONTENT_UNSUPPORTED), button (web_app / start_parameter) + legacy switch_pm_*; https URLs only; live_period ignored; inline_query and chosen_inline_result updates are enqueued (chosen_inline_result always, no /setinlinefeedback)
Параметры
Unique identifier for the answered query
A JSON-serialized Array of results for the inline query
The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.
Pass True if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query.
Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.
A JSON-serialized object describing a button to be shown above inline query results
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/answerInlineQuery" \
-H "Content-Type: application/json" \
-d '{
"inline_query_id": "<inline_query_id>",
"results": []
}'aiogram 3
from aiogram import Bot
from aiogram.client.session.aiohttp import AiohttpSession
from aiogram.client.telegram import TelegramAPIServer
session = AiohttpSession(api=TelegramAPIServer.from_base("https://api.staticgram.top"))
bot = Bot(TOKEN, session=session)
result = await bot.answer_inline_query(inline_query_id="<inline_query_id>", results=[])JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/answerInlineQuery`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"inline_query_id": "<inline_query_id>",
"results": []
}),
});
const data = await res.json();Ответ (True)
JSON
{
"ok": true,
"result": true
}