mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-08 15:19:14 +02:00
Framework Rewrite
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user