various improvements and fixes
fixes a DM bug, and improves mention handling
This commit is contained in:
parent
a22c2f10c0
commit
127a9e8250
6 changed files with 84 additions and 34 deletions
|
@ -243,7 +243,11 @@ class Message extends SnowFlake{
|
|||
if(userd instanceof User){
|
||||
return this.mentions.includes(userd);
|
||||
}else if(userd instanceof Member){
|
||||
return this.mentions.includes(userd.user);
|
||||
if(this.mentions.includes(userd.user)){
|
||||
return true
|
||||
}else{
|
||||
return !new Set(this.mentions).isDisjointFrom(new Set(userd.roles));//if the message mentions a role the user has
|
||||
}
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue