mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 12:40:50 +00:00
Fix MessageMentions#has not returning true for role mentions (#1840)
This commit is contained in:
parent
3c532f16bc
commit
258fc4ecf3
1 changed files with 1 additions and 1 deletions
|
|
@ -126,7 +126,7 @@ class MessageMentions {
|
||||||
has(data, strict = true) {
|
has(data, strict = true) {
|
||||||
if (strict && this.everyone) return true;
|
if (strict && this.everyone) return true;
|
||||||
if (strict && data instanceof GuildMember) {
|
if (strict && data instanceof GuildMember) {
|
||||||
for (const role of this.roles) if (data.roles.has(role.id)) return true;
|
for (const role of this.roles.values()) if (data.roles.has(role.id)) return true;
|
||||||
}
|
}
|
||||||
const id = data.id || data;
|
const id = data.id || data;
|
||||||
return this.users.has(id) || this.channels.has(id) || this.roles.has(id);
|
return this.users.has(id) || this.channels.has(id) || this.roles.has(id);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue