Skip to main content

account.saveAutoSaveSettings

Modify autosave settings

func (c *Client) AccountSaveAutoSaveSettings(ctx context.Context, request *AccountSaveAutoSaveSettingsRequest) (bool, error)

Calling this method

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

res, err := api.AccountSaveAutoSaveSettings(ctx, &tg.AccountSaveAutoSaveSettingsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
UsersboolWhether the new settings should affect all private chats
ChatsboolWhether the new settings should affect all groups
BroadcastsboolWhether the new settings should affect all channels
PeerInputPeerClassWhether the new settings should affect a specific peer
SettingsAutoSaveSettingsyesThe new autosave settings

Returns

bool

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.

References