bots.setBotBroadcastDefaultAdminRights
Set the default suggested admin rights for bots being added as admins to channels, see here for more info on how to handle them ».
func (c *Client) BotsSetBotBroadcastDefaultAdminRights(ctx context.Context, adminrights ChatAdminRights) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.BotsSetBotBroadcastDefaultAdminRights(ctx, adminrights)
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
AdminRights | ChatAdminRights | yes | Admin rights |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | RIGHTS_NOT_MODIFIED | The new admin rights are equal to the old rights, no change was made. |
| 400 | USER_BOT_REQUIRED | This method can only be called by a bot. |
References
- Official documentation
- Generated Go reference
- TL definition:
bots.setBotBroadcastDefaultAdminRights#788464e1