koishi-plugin-mc-tools
Version:
我的世界(Minecraft)。可查询 MC 版本、服务器信息、玩家皮肤信息以及四大平台资源;支持管理服务器,功能梭哈
25 lines (24 loc) • 756 B
TypeScript
import { Context, Command } from 'koishi';
import { Config } from '../index';
/**
* 定义机器人发送通知的目标。
*/
export interface StatusTarget {
platform: string;
channelId: string;
}
/**
* 向 Koishi 注册 .status 子命令。
* @param mc - 父命令 'mc' 的实例。
*/
export declare function registerStatus(mc: Command): void;
/**
* 启动后台定时状态检查任务。
* 仅在所有服务全部宕机或全部恢复正常时发送通知。
* @param ctx - Koishi 的上下文对象。
* @param config - 插件配置,包含通知目标和检查频率。
*/
export declare function regStatusCheck(ctx: Context, config: Config & {
statusNoticeTargets?: StatusTarget[];
statusUpdInterval?: number;
}): void;