setMyDefaultAdministratorRightsПоддерживается
Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns True on success.
Особенности StaticGram
stored per groups/channels, shared with bots.setBot{Group,Broadcast}DefaultAdminRights and projected into userFull.bot_group_admin_rights / bot_broadcast_admin_rights
Параметры
A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.
Pass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/setMyDefaultAdministratorRights"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.set_my_default_administrator_rights()JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/setMyDefaultAdministratorRights`);
const data = await res.json();Ответ (True)
JSON
{
"ok": true,
"result": true
}