handle two more events

This commit is contained in:
MathMan05 2024-11-28 18:25:30 -06:00
parent c66ee79241
commit d406b0e672
3 changed files with 32 additions and 0 deletions

View file

@ -562,6 +562,21 @@ class Localuser{
}
break;
}
case "GUILD_MEMBER_ADD":{
const guild=this.guildids.get(temp.d.guild_id);
if(!guild) break;
Member.new(temp.d,guild);
break;
}
case "GUILD_MEMBER_REMOVE":{
const guild=this.guildids.get(temp.d.guild_id);
if(!guild) break;
const user=new User(temp.d.user,this);
const member=user.members.get(guild);
if(!(member instanceof Member)) break;
member.remove();
break;
}
default :{
//@ts-ignore
console.warn("Unhandled case "+temp.t,temp);