From abc7bf69927f8a2f26349d5424c0980d3e35f4ed Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 13 Nov 2020 20:48:55 +0100 Subject: [PATCH] Update NotificationSounds.plugin.js --- Plugins/NotificationSounds/NotificationSounds.plugin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugins/NotificationSounds/NotificationSounds.plugin.js b/Plugins/NotificationSounds/NotificationSounds.plugin.js index 06ceb11012..3154acb339 100644 --- a/Plugins/NotificationSounds/NotificationSounds.plugin.js +++ b/Plugins/NotificationSounds/NotificationSounds.plugin.js @@ -14,7 +14,7 @@ module.exports = (_ => { "info": { "name": "NotificationSounds", "author": "DevilBro", - "version": "3.5.3", + "version": "3.5.4", "description": "Allow you to replace the native sounds of Discord with your own" }, "changeLog": { @@ -268,6 +268,7 @@ module.exports = (_ => { BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.SoundUtils, "playSound", {instead: e => { let type = e.methodArguments[0]; if (choices[type]) BDFDB.TimeUtils.timeout(_ => { + e.stopOriginalMethodCall(); if (type == "message1") { if (firedEvents["dm"]) firedEvents["dm"] = false; else if (firedEvents["mentioned"]) firedEvents["mentioned"] = false; @@ -278,7 +279,7 @@ module.exports = (_ => { } else this.playAudio(type); }); - else e.callOriginalMethod(); + else e.callOriginalMethodAfterwards(); }}); BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.SoundUtils, "createSound", {after: e => { if (choices[e.methodArguments[0]]) {