jank-client-fork/webpage/member.js
2024-05-26 20:11:56 -05:00

22 lines
512 B
JavaScript

class member{
constructor(memberjson){
for(const thing of Object.keys(memberjson)){
this[thing]=memberjson[thing];
}
this.user=new user(this.user);
}
hasRole(ID){
for(const thing of this.roles){
console.log(this.roles)
if(thing.id===ID){
return true;
}
}
return false;
}
isAdmin(){
console.log(this);
return this.guild.properties.owner_id===this.user.id;
}
}