From 811773e6347d0d49c28c3939fca864ff66a028b0 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sat, 6 Jan 2024 09:10:54 +0700 Subject: [PATCH] Update MessageMentions.js --- src/structures/MessageMentions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/structures/MessageMentions.js b/src/structures/MessageMentions.js index a2438e5..8c9c710 100644 --- a/src/structures/MessageMentions.js +++ b/src/structures/MessageMentions.js @@ -211,12 +211,13 @@ class MessageMentions { */ has(data, { ignoreDirect = false, ignoreRoles = false, ignoreRepliedUser = false, ignoreEveryone = false } = {}) { const user = this.client.users.resolve(data); + if (!ignoreEveryone && user && this.everyone) return true; const userWasRepliedTo = user && this.repliedUser?.id === user.id; if (!ignoreRepliedUser && userWasRepliedTo && this.users.has(user.id)) return true; - if (!ignoreRepliedUser && this.users.has(this.repliedUser?.id) && this.repliedUser?.id === user?.id) return true; + if (!ignoreDirect) { if (user && (!ignoreRepliedUser || this.parsedUsers.has(user.id)) && this.users.has(user.id)) return true; @@ -226,7 +227,7 @@ class MessageMentions { const channel = this.client.channels.resolve(data); if (channel && this.channels.has(channel.id)) return true; } - if (user && !ignoreEveryone && this.everyone) return true; + if (!ignoreRoles) { const member = this.guild?.members.resolve(data); if (member) {