answerGuestQueryПоддерживается
Use this method to reply to a received guest message. On success, a SentGuestMessage object is returned.
Особенности StaticGram
guest mode via @BotFather /setguestmode (User.bot_guestchat, getMe supports_guest_queries); a mention, or a reply to a guest answer, in a private chat between users or a supergroup where the bot is not a member produces guest_message (Message.guest_query_id) and MTProto updateBotGuestChatQuery; answered once within 15 min with an InlineQueryResult (or messages.setBotGuestChatResult) → posted as a reply via @bot in the caller's name; returns SentGuestMessage.inline_message_id (editable); guest_bot_caller_user/chat are not stored
Параметры
Unique identifier for the query to be answered
A JSON-serialized object describing the message to be sent
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/answerGuestQuery" \
-H "Content-Type: application/json" \
-d '{
"guest_query_id": "value",
"result": {}
}'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_guest_query(guest_query_id="value", result={})JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/answerGuestQuery`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"guest_query_id": "value",
"result": {}
}),
});
const data = await res.json();Ответ (SentGuestMessage)
JSON
{
"ok": true,
"result": {
"inline_message_id": "..."
}
}