steam-family-bot-core
Version:
一个用于新版 Steam 家庭的库存监控 Bot 插件
28 lines • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const builder_1 = require("../cmd/builder");
// todo
// this is a command for user that need to remove dirty data
exports.default = () => new builder_1.CommandBuilder()
.setName('clear')
.setDescription('clear an auth account relate info')
.addAlias('sbclear')
.setExecutor(async (c) => {
const { steamService, logger, session, options, input } = c;
const account = await steamService.db.Account.getSteamAccountBySessionUid(session.uid);
if (!account) {
session.sendQueued(session.text('commands.clear.no-binding'));
return;
}
if (account.status == 'un-auth') {
session.sendQueued(session.text('commands.clear.no-auth-binding'));
return;
}
await steamService.db.clearAccountInfo(account);
session.sendQueued(session.text('commands.clear.clear-success', {
accountName: account.accountName,
accountId: account.steamId,
}));
return;
});
//# sourceMappingURL=clear.js.map