closeПоддерживается
Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.
Особенности StaticGram
returns True
Параметры
Метод не принимает параметров.
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/close"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.close()JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/close`);
const data = await res.json();Ответ (True)
JSON
{
"ok": true,
"result": true
}