import { Bot, Context, Logger, Schema, h } from "koishi"; import { Notifier } from "@koishijs/plugin-notifier"; declare module 'koishi' { interface Context { broadcast?: (channel: string[], content: h.Fragment) => Promise; } } declare class BiliCmd { static inject: string[]; log: Logger; conf: BiliCmd.Config; loginTimer: Function; subNotifier: Notifier; /** * 关注分组 */ followGroup: number; constructor(ctx: Context, config: BiliCmd.Config); /** * 检查动态并推送 * @param ctx 上下文 */ private checkDynamic; /** * 检查直播并推送 * @param ctx 上下文 */ private checkLive; private initBiliCmd; /** * 初始化关注分组:获取对应名称关注分组的id;若无,则创建关注分组 * @param ctx 上下文 */ private setupFollowGroup; private checkUnsubUser; private registerDebugCommand; private broadcast; private sendToMaster; sendPrivateMsgAndRebootService(ctx: Context, bot: Bot, content: string): Promise; checkIfLoginInfoIsLoaded(ctx: Context): Promise; checkIfIsLogin(ctx: Context): Promise; } declare namespace BiliCmd { interface Config { master: { enable: boolean; masterAccount: string; }; liveStartAtAll: boolean; liveCheckCron: string; followGroup: string; customLiveStart: string; customLiveEnd: string; dynamicUrl: boolean; dynamicCheckCron: string; filter: { enable: boolean; notify: boolean; regex: string; keywords: Array; }; dynamicDebugMode: boolean; commandDebug: boolean; dynamicSection: {}; liveSection: {}; debugSection: {}; } const Config: Schema; } export default BiliCmd;