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.
parameters
| parameter | type | required | description |
|---|---|---|---|
rights | ChatAdministratorRights | optional | A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared. |
for_channels | boolean | optional | 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. |
returns
boolean
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { SetMyDefaultAdministratorRightsParams } from "@yaebal/types";
await bot.api.call<boolean>("setMyDefaultAdministratorRights", {} satisfies SetMyDefaultAdministratorRightsParams);official Bot API docs: https://core.telegram.org/bots/api/#setmydefaultadministratorrights