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
| Name | Type | Required | Description |
|---|---|---|---|
Users | bool | — | Whether the new settings should affect all private chats |
Chats | bool | — | Whether the new settings should affect all groups |
Broadcasts | bool | — | Whether the new settings should affect all channels |
Peer | InputPeerClass | — | Whether the new settings should affect a specific peer |
Settings | AutoSaveSettings | yes | The new autosave settings |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.saveAutoSaveSettings#d69b8361