sendChecklistПоддерживается
Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.
Особенности StaticGram
business_connection_id supported (see sendMessage)
Параметры
Unique identifier of the business connection on behalf of which the message will be sent
Unique identifier for the target chat or username of the target bot in the format
@usernameA JSON-serialized object for the checklist to send
Sends the message silently. Users will receive a notification with no sound.
Protects the contents of the sent message from forwarding and saving
Unique identifier of the message effect to be added to the message
A JSON-serialized object for description of the message to reply to
A JSON-serialized object for an inline keyboard
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/sendChecklist" \
-H "Content-Type: application/json" \
-d '{
"business_connection_id": "<business_connection_id>",
"chat_id": 123456789,
"checklist": {}
}'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.send_checklist(
business_connection_id="<business_connection_id>",
chat_id=123456789,
checklist={},
)JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/sendChecklist`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"business_connection_id": "<business_connection_id>",
"chat_id": 123456789,
"checklist": {}
}),
});
const data = await res.json();Ответ (Message)
JSON
{
"ok": true,
"result": {
"message_id": 1,
"date": 1790000000,
"chat": {
"id": 1780243423,
"type": "private"
}
}
}