jank-client-fork/.dist/role.js
2024-06-27 11:27:38 -05:00

28 lines
614 B
JavaScript

export { Role };
import { Permissions } from "./permissions.js";
class Role {
permissions;
owner;
color;
id;
constructor(JSON, owner) {
for (const thing of Object.keys(JSON)) {
this[thing] = JSON[thing];
}
this.permissions = new Permissions(JSON.permissions);
this.owner = owner;
}
get guild() {
return this.owner;
}
get localuser() {
return this.guild.localuser;
}
getColor() {
if (this.color === 0) {
return null;
}
;
return `#${this.color.toString(16)}`;
}
}