JSON -> json
This commit is contained in:
parent
72ddec2fa0
commit
883430f038
5 changed files with 62 additions and 62 deletions
|
@ -18,17 +18,17 @@ class Role{
|
|||
get id(){
|
||||
return this.snowflake.id;
|
||||
}
|
||||
constructor(JSON, owner:Guild){
|
||||
constructor(json, owner:Guild){
|
||||
this.headers=owner.headers;
|
||||
this.info=owner.info;
|
||||
for(const thing of Object.keys(JSON)){
|
||||
for(const thing of Object.keys(json)){
|
||||
if(thing==="id"){
|
||||
this.snowflake=new SnowFlake(JSON.id,this);
|
||||
this.snowflake=new SnowFlake(json.id,this);
|
||||
continue;
|
||||
}
|
||||
this[thing]=JSON[thing];
|
||||
this[thing]=json[thing];
|
||||
}
|
||||
this.permissions=new Permissions(JSON.permissions);
|
||||
this.permissions=new Permissions(json.permissions);
|
||||
this.owner=owner;
|
||||
}
|
||||
get guild():Guild{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue