savePreparedInlineMessageПоддерживается
Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.
Параметры
Unique identifier of the target user that can use the prepared message
A JSON-serialized object describing the message to be sent
Pass True if the message can be sent to private chats with users
Pass True if the message can be sent to private chats with bots
Pass True if the message can be sent to group and supergroup chats
Pass True if the message can be sent to channel chats
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/savePreparedInlineMessage" \
-H "Content-Type: application/json" \
-d '{
"user_id": 123456789,
"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.save_prepared_inline_message(user_id=123456789, result={})JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/savePreparedInlineMessage`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"user_id": 123456789,
"result": {}
}),
});
const data = await res.json();Ответ (PreparedInlineMessage)
JSON
{
"ok": true,
"result": {
"id": "...",
"expiration_date": 1
}
}