steam-family-bot-core
Version:
一个用于新版 Steam 家庭的库存监控 Bot 插件
25 lines • 975 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const builder_1 = require("../cmd/builder");
exports.default = () => new builder_1.CommandBuilder()
.setName('unbind')
.setDescription('remove bind info')
.addAlias('sbunbind')
.setExecutor(async (c) => {
const { steamService, session } = c;
const steamAccount = await steamService.db.Account.getSteamAccountBySessionUid(session.uid);
if (!steamAccount) {
await session.sendQueued(session.text('commands.unbind.no-binding'));
}
if (steamAccount.status !== 'un-auth') {
await session.sendQueued(session.text('commands.unbind.no-binding', {
steamId: steamAccount.steamId,
}));
return;
}
await steamService.db.Account.removeUnAuthAccount(steamAccount.id);
await session.sendQueued(session.text('commands.unbind.success', {
steamId: steamAccount.steamId,
}));
});
//# sourceMappingURL=unbind.js.map