UNPKG

koishi-plugin-beatsaber-bot

Version:

一个 用于 BeatSaber 的 koishi Bot 插件

40 lines (39 loc) 1.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BLFilterCmd = void 0; // manage bl filter condition function BLFilterCmd(ctx, cfg, render, api, logger) { const filterCmd = ctx .command('bsbot.subscribe.filter') .alias('bbfilter') .userFields(['id']) .option('type', '<type:string>') .action(async ({ session, options }, input) => { if (options.type === "beatleader") { // check uid, check channel subscribe const channelSub = await ctx.database.get('BSBotSubscribe', { channelId: session.channelId, type: 'beatleader', }); const channelFilter = channelSub[0].data; if (channelSub.length < 0) { session.sendQuote(session.text("commands.bsbot.subscribe.filter.bl.channel-no-sub")); } const ops = await session.prompt(30000); // d1 // d2 // d3 // update rank only // update channel filter // update member filter // 当前筛选器 // params session.channelId; } }); return { key: 'subscribe.filter', cmd: filterCmd }; } exports.BLFilterCmd = BLFilterCmd;