UNPKG

koishi-plugin-mc-tools

Version:

我的世界(Minecraft/MC)工具。支持查询MCWiki/MCMod/CurseForge/Modrinth、服务器信息、最新版本和玩家皮肤;推送MC更新通知,运行命令等

30 lines (29 loc) 1.06 kB
import { Context } from 'koishi'; import { MTConfig } from './index'; import { SearchResult } from './wiki'; interface ProcessResult { sections: string[]; links: string[]; } export declare function formatContent(result: ProcessResult, url: string, options?: { linkCount?: number; showImages?: 'always' | 'noqq' | 'never'; platform?: string; }): string; export declare function fetchModContent(url: string, config: MTConfig): Promise<ProcessResult>; /** * MCMOD 搜索 * @param {string} keyword - 搜索关键词 * @param {MTConfig} config - Minecraft工具配置 * @returns {Promise<SearchResult[]>} 搜索结果列表 * @throws {Error} 搜索失败时抛出错误 */ export declare function searchMod(keyword: string, config: MTConfig): Promise<SearchResult[]>; /** * 注册 Minecraft Mod 相关命令 * @param {Context} ctx - Koishi上下文 * @param {Command} parent - 父命令 * @param {MTConfig} config - 插件配置 */ export declare function registerModCommands(ctx: Context, parent: any, config: MTConfig): void; export {};