From fd647eb678eac05a25d87f9b7c646399dad0ef13 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sat, 4 Nov 2023 19:53:40 +0100 Subject: [PATCH] Update FriendNotifications.plugin.js --- Plugins/FriendNotifications/FriendNotifications.plugin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/FriendNotifications/FriendNotifications.plugin.js b/Plugins/FriendNotifications/FriendNotifications.plugin.js index 49800ac8c4..8b1e0e5f8a 100644 --- a/Plugins/FriendNotifications/FriendNotifications.plugin.js +++ b/Plugins/FriendNotifications/FriendNotifications.plugin.js @@ -2,7 +2,7 @@ * @name FriendNotifications * @author DevilBro * @authorId 278543574059057154 - * @version 1.9.7 + * @version 1.9.8 * @description Shows a Notification when a Friend or a User, you choose to observe, changes their Status * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -706,9 +706,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, body) => { if (error) BDFDB.NotificationUtils.toast("Could not fetch File, please make sure the File exists", {type: "danger"}); - else successSavedAudio(key, source, `data:audio/mpeg;base64,${btoa(BDFDB.DiscordUtils.bufferToString(buffer))}`); + else successSavedAudio(key, source, `data:audio/mpeg;base64,${btoa(body)}`); }); }, children: BDFDB.LanguageUtils.LanguageStrings.SAVE