declineSuggestedPostПоддерживается
Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns True on success.
Параметры
Unique identifier for the target direct messages chat
Identifier of a suggested post message to decline
Comment for the creator of the suggested post; 0-128 characters
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/declineSuggestedPost" \
-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.decline_suggested_post(chat_id=123456789, message_id=42)JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/declineSuggestedPost`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"chat_id": 123456789,
"message_id": 42
}),
});
const data = await res.json();Ответ (True)
JSON
{
"ok": true,
"result": true
}