From 114f3604007ceafed3e5fc742ad1eaa645e98847 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sat, 4 Nov 2023 19:55:31 +0100 Subject: [PATCH] Update NotificationSounds.plugin.js --- Plugins/NotificationSounds/NotificationSounds.plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/NotificationSounds/NotificationSounds.plugin.js b/Plugins/NotificationSounds/NotificationSounds.plugin.js index 4546ae38b6..17ff3d1ab0 100644 --- a/Plugins/NotificationSounds/NotificationSounds.plugin.js +++ b/Plugins/NotificationSounds/NotificationSounds.plugin.js @@ -435,7 +435,7 @@ 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, "utf8", (error, buffer) => { + else BDFDB.LibraryRequires.fs.readFile(source, "utf8", (error, body) => { 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(body)}`}); });