koishi-plugin-mc-tools
Version:
我的世界(Minecraft)。可查询 MC 版本、服务器信息、玩家皮肤信息以及四大平台资源;支持管理服务器,功能梭哈
41 lines (40 loc) • 1.2 kB
TypeScript
import { Context, Command } from 'koishi';
import { Config } from '../index';
/**
* 更新目标配置
* @interface UpdTarget
* @property {string} platform - 机器人平台名称
* @property {string} channelId - 频道/群组ID
* @property {'release' | 'snapshot' | 'both'} type - 通知类型:正式版、快照版或两者都通知
*/
export interface UpdTarget {
platform: string;
channelId: string;
type: 'release' | 'snapshot' | 'both';
}
/**
* 群组到服务器的映射配置
* @interface ServerMaps
* @property {string} platform - 平台ID
* @property {string} channelId - 频道ID
* @property {number} serverId - 对应的服务器ID
* @property {string} [serverAddress] - 用于服务器查询的地址(可选)
*/
export interface ServerMaps {
platform: string;
channelId: string;
serverId: number;
serverAddress?: string;
}
/**
* 清理版本检查定时器
*/
export declare function cleanupVerCheck(): void;
/**
* 注册Minecraft版本查询命令
*/
export declare function registerVer(mc: Command): void;
/**
* 设置Minecraft版本更新检测和通知
*/
export declare function regVerCheck(ctx: Context, config: Config): void;