steam-family-bot-core
Version:
一个用于新版 Steam 家庭的库存监控 Bot 插件
41 lines • 1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CommandBuilder = void 0;
class CommandBuilder {
name;
description;
options = [];
aliases = [];
addOption(name, description) {
this.options.push({
name: name,
description: description,
type: 'string',
});
return this;
}
addAlias(alias, option) {
this.aliases.push({ alias, option });
return this;
}
setName(name) {
this.name = name;
return this;
}
setDescription(description) {
this.description = description;
return this;
}
setExecutor(executor) {
return {
name: this.name,
description: this.description,
aliases: this.aliases,
options: this.options,
callback: executor,
children: [],
};
}
}
exports.CommandBuilder = CommandBuilder;
//# sourceMappingURL=builder.js.map