init stuff
This commit is contained in:
22
webpage/member.js
Normal file
22
webpage/member.js
Normal file
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user