remove snowflake instances
This commit is contained in:
parent
004beb4955
commit
e66b6c0883
16 changed files with 97 additions and 149 deletions
|
@ -1,10 +1,9 @@
|
|||
import { Permissions } from "./permissions.js";
|
||||
import { SnowFlake } from "./snowflake.js";
|
||||
class Role {
|
||||
class Role extends SnowFlake {
|
||||
permissions;
|
||||
owner;
|
||||
color;
|
||||
snowflake;
|
||||
name;
|
||||
info;
|
||||
hoist;
|
||||
|
@ -12,15 +11,12 @@ class Role {
|
|||
mentionable;
|
||||
unicode_emoji;
|
||||
headers;
|
||||
get id() {
|
||||
return this.snowflake.id;
|
||||
}
|
||||
constructor(json, owner) {
|
||||
super(json.id);
|
||||
this.headers = owner.headers;
|
||||
this.info = owner.info;
|
||||
for (const thing of Object.keys(json)) {
|
||||
if (thing === "id") {
|
||||
this.snowflake = new SnowFlake(json.id);
|
||||
continue;
|
||||
}
|
||||
this[thing] = json[thing];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue