Update NotificationSounds.plugin.js

This commit is contained in:
Mirco Wittrien 2022-04-10 09:07:00 +02:00
parent 7108bc2537
commit 549eb59695
1 changed files with 1 additions and 6 deletions

View File

@ -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);