Framework Rewrite

This commit is contained in:
Dragon Fire
2021-06-05 12:17:33 -04:00
parent 5c9f237321
commit 7917766ce3
48 changed files with 1101 additions and 294 deletions
+20
View File
@@ -0,0 +1,20 @@
const UnionType = require('./UnionType');
module.exports = class Argument {
constructor(client, options) {
Object.defineProperty(this, 'client', { value: client });
this.key = options.key.toLowerCase();
this.typeID = options.type.toLowerCase();
this.min = options.min;
this.max = options.max;
this.oneOf = options.oneOf;
this.default = options.default;
this.avatarSize = options.avatarSize || 2048;
}
get type() {
if (this.typeID.includes('|')) return new UnionType(this.client, this.typeID);
return this.client.registry.types.get(this.typeID);
}
};