StaticGramBot API

deleteMyCommandsПоддерживается

Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.

Особенности StaticGram

per scope + language bucket

Параметры

scopeBotCommandScopeнеобязательный
A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.
language_codeStringнеобязательный
A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands.

Пример запроса

curl
curl "https://api.staticgram.top/bot$TOKEN/deleteMyCommands"
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.delete_my_commands()
JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/deleteMyCommands`);
const data = await res.json();

Ответ (True)

JSON
{
  "ok": true,
  "result": true
}

Описания методов и типов взяты из официальной документации Telegram Bot API (Bot API 10.3). Адрес API: https://api.staticgram.top