From d0cc8d99d4afcbae4ef04386f5d79f54c4e462a3 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sat, 22 Oct 2022 12:35:00 +0200 Subject: [PATCH] stuff --- Plugins/FriendNotifications/FriendNotifications.plugin.js | 6 +++--- Plugins/NotificationSounds/NotificationSounds.plugin.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Plugins/FriendNotifications/FriendNotifications.plugin.js b/Plugins/FriendNotifications/FriendNotifications.plugin.js index c5a2ea456c..703a0f7f61 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.8.4 + * @version 1.8.5 * @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 @@ -688,9 +688,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, response) => { + else BDFDB.LibraryRequires.fs.readFile(source, "", (error, buffer) => { 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,${response.toString("base64")}`); + else successSavedAudio(key, source, `data:audio/mpeg;base64,${Buffer.from(buffer).toString("base64")}`); }); }, children: BDFDB.LanguageUtils.LanguageStrings.SAVE diff --git a/Plugins/NotificationSounds/NotificationSounds.plugin.js b/Plugins/NotificationSounds/NotificationSounds.plugin.js index a275e7c342..999793557f 100644 --- a/Plugins/NotificationSounds/NotificationSounds.plugin.js +++ b/Plugins/NotificationSounds/NotificationSounds.plugin.js @@ -2,7 +2,7 @@ * @name NotificationSounds * @author DevilBro * @authorId 278543574059057154 - * @version 3.7.4 + * @version 3.7.5 * @description Allows you to replace the native Sounds with custom Sounds * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -408,9 +408,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, response) => { + else BDFDB.LibraryRequires.fs.readFile(source, "", (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,${response.toString("base64")}`}); + else return successSavedAudio({category, sound, source: `data:audio/mpeg;base64,${Buffer.from(buffer).toString("base64")}`}); }); }, children: BDFDB.LanguageUtils.LanguageStrings.SAVE