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
Usersbool—Whether the new settings should affect all private chats
Chatsbool—Whether the new settings should affect all groups
Broadcastsbool—Whether the new settings should affect all channels
PeerInputPeerClass—Whether 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​