Update NotificationSounds.plugin.js

This commit is contained in:
Mirco Wittrien 2020-11-13 21:01:48 +01:00
parent abc7bf6992
commit 51fa0d9292
1 changed files with 2 additions and 1 deletions

View File

@ -267,7 +267,8 @@ module.exports = (_ => {
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.SoundUtils, "playSound", {instead: e => {
let type = e.methodArguments[0];
if (choices[type]) BDFDB.TimeUtils.timeout(_ => {
if (!type) return;
else if (choices[type]) BDFDB.TimeUtils.timeout(_ => {
e.stopOriginalMethodCall();
if (type == "message1") {
if (firedEvents["dm"]) firedEvents["dm"] = false;