snowflake and cleaning up classes

This commit is contained in:
MathMan05 2024-07-23 23:01:45 -05:00
parent 14d1c69c7d
commit 7eb3ff6cab
21 changed files with 584 additions and 361 deletions

View file

@ -1,5 +1,6 @@
export { Role };
import { Permissions } from "./permissions.js";
import { SnowFlake } from "./snowflake.js";
class Role {
permissions;
owner;
@ -16,6 +17,10 @@ class Role {
this.headers = owner.headers;
this.info = owner.info;
for (const thing of Object.keys(JSON)) {
if (thing === "id") {
this.id = new SnowFlake(JSON.id, this);
continue;
}
this[thing] = JSON[thing];
}
this.permissions = new Permissions(JSON.permissions);