account.saveRingtone
Save or remove saved notification sound. If the notification sound is already in MP3 format, account.savedRingtone will be returned. Otherwise, it will be automatically converted and a account.savedRingtoneConverted will be returned, containing a new document object that should be used to refer to the ringtone from now on (ie when deleting it using the unsave parameter, or when downloading it).
func (c *Client) AccountSaveRingtone(ctx context.Context, request *AccountSaveRingtoneRequest) (AccountSavedRingtoneClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountSaveRingtone(ctx, &tg.AccountSaveRingtoneRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // AccountSavedRingtoneClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ID | InputDocumentClass | yes | Notification sound uploaded using account.uploadRingtone |
Unsave | bool | yes | Whether to add or delete the notification sound |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | RINGTONE_INVALID | The specified ringtone is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.saveRingtone#3dea5b03