From 549eb59695df7325fe43306ccd31563b07f6933f Mon Sep 17 00:00:00 2001 From: Mirco Wittrien <23700969+mwittrien@users.noreply.github.com> Date: Sun, 10 Apr 2022 09:07:00 +0200 Subject: [PATCH] Update NotificationSounds.plugin.js --- Plugins/NotificationSounds/NotificationSounds.plugin.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Plugins/NotificationSounds/NotificationSounds.plugin.js b/Plugins/NotificationSounds/NotificationSounds.plugin.js index 1388992229..6310336999 100644 --- a/Plugins/NotificationSounds/NotificationSounds.plugin.js +++ b/Plugins/NotificationSounds/NotificationSounds.plugin.js @@ -236,7 +236,7 @@ module.exports = (_ => { return; } else if (guildId) { - if (this.isRawMessageMentioned(message, BDFDB.UserUtils.me.id)) { + if (BDFDB.LibraryModules.MentionUtils.isRawMessageMentioned({rawMessage: message, userId: BDFDB.UserUtils.me.id})) { if (message.mentions.length && !this.isSuppressMentionsEnabled(guildId, channel.id)) for (const mention of message.mentions) if (mention.id == BDFDB.UserUtils.me.id) { if (message.message_reference && !message.interaction && (!muted || choices.reply.force) && !(choices.reply.focus && focused)) { this.fireEvent("reply"); @@ -723,11 +723,6 @@ module.exports = (_ => { createdAudios[type] = new WebAudioSound(type); createdAudios[type].play(); } - - isRawMessageMentioned (message, userId) { - try {return BDFDB.LibraryModules.MentionUtils.isRawMessageMentioned(message, BDFDB.UserUtils.me.id)} - catch (err) {return BDFDB.LibraryModules.MentionUtils.isRawMessageMentioned({rawMessage: message, userId: BDFDB.UserUtils.me.id})} - } isSuppressMentionsEnabled (guildId, channelId) { let channelSettings = BDFDB.LibraryModules.MutedUtils.getChannelMessageNotifications(guildId, channelId);