Update NotificationSounds.plugin.js
This commit is contained in:
parent
79ba5745cf
commit
4f914db899
|
@ -2,7 +2,7 @@
|
|||
* @name NotificationSounds
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 3.8.6
|
||||
* @version 3.8.7
|
||||
* @description Allows you to replace the native Sounds with custom Sounds
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -435,9 +435,9 @@ module.exports = (_ => {
|
|||
}
|
||||
BDFDB.NotificationUtils.toast("Use a valid direct link to a video or audio source, they usually end on something like .mp3, .mp4 or .wav", {type: "danger"});
|
||||
});
|
||||
else BDFDB.LibraryRequires.fs.readFile(source, "", (error, buffer) => {
|
||||
else BDFDB.LibraryRequires.fs.readFile(source, "utf8", (error, buffer) => {
|
||||
if (error) BDFDB.NotificationUtils.toast("Could not fetch file. Please make sure the file exists.", {type: "danger"});
|
||||
else return successSavedAudio({category, sound, source: `data:audio/mpeg;base64,${btoa(BDFDB.DiscordUtils.bufferToString(buffer))}`});
|
||||
else return successSavedAudio({category, sound, source: `data:audio/mpeg;base64,${btoa(body)}`});
|
||||
});
|
||||
},
|
||||
children: BDFDB.LanguageUtils.LanguageStrings.SAVE
|
||||
|
|
Loading…
Reference in New Issue