Link Search Menu Expand Document

Method: account.saveRingtone

Back to methods index

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:

NameTypeDescriptionRequired
idMessageMedia, Update, Message or InputDocumentNotification sound uploaded using account.uploadRingtoneOptional
unsaveBoolWhether to add or delete the notification soundYes

Return type: account.SavedRingtone

Can userbots use this method: YES

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, );