various improvements and fixes

fixes a DM bug, and improves mention handling
This commit is contained in:
MathMan05 2024-12-09 14:51:24 -06:00
parent a22c2f10c0
commit 127a9e8250
6 changed files with 84 additions and 34 deletions

View file

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