stopPollПоддерживается
Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
Особенности StaticGram
returns Poll; optional new inline keyboard; business_connection_id: only polls this bot sent for the account
Параметры
Unique identifier of the business connection on behalf of which the message to be edited was sent
Unique identifier for the target chat or username of the target bot, supergroup or channel in the format
@usernameIdentifier of the original message with the poll
A JSON-serialized object for a new message inline keyboard
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/stopPoll" \
-H "Content-Type: application/json" \
-d '{
"chat_id": 123456789,
"message_id": 42
}'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.stop_poll(chat_id=123456789, message_id=42)JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/stopPoll`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"chat_id": 123456789,
"message_id": 42
}),
});
const data = await res.json();Ответ (Poll)
JSON
{
"ok": true,
"result": {
"id": "...",
"question": "...",
"options": [],
"total_voter_count": 1,
"is_closed": true,
"is_anonymous": true,
"type": "private",
"allows_multiple_answers": true,
"allows_revoting": true,
"members_only": true
}
}