Method: 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).
Parameters:
Name | Type | Description | Required |
---|---|---|---|
id | MessageMedia, Update, Message or InputDocument | Notification sound uploaded using account.uploadRingtone | Optional |
unsave | Bool | Whether to add or delete the notification sound | Yes |
Return type: account.SavedRingtone
Can bots use this method: NO
MadelineProto Example (now async for huge speed and parallelism!):
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$account_SavedRingtone = $MadelineProto->account->saveRingtone(id: $InputDocument, unsave: $Bool, );