Skip to main content

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​

NameTypeRequiredDescription
AdminRightsChatAdminRightsyesAdmin rights

Returns​

bool

Possible errors​

CodeTypeDescription
400RIGHTS_NOT_MODIFIEDThe new admin rights are equal to the old rights, no change was made.
400USER_BOT_REQUIREDThis method can only be called by a bot.

References​