Skip to main content

bots.setBotGroupDefaultAdminRights

Set the default suggested admin rights for bots being added as admins to groups, see here for more info on how to handle them ».

func (c *Client) BotsSetBotGroupDefaultAdminRights(ctx context.Context, adminrights ChatAdminRights) (bool, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.BotsSetBotGroupDefaultAdminRights(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