koishi-plugin-mc-tools
Version:
我的世界(Minecraft)。可查询 MC 版本、服务器信息、玩家皮肤信息以及四大平台资源;支持管理服务器,功能梭哈
46 lines (45 loc) • 1.32 kB
TypeScript
import { Context, Command, h } from 'koishi';
import { Config } from '../index';
/**
* 搜索Minecraft Wiki页面
* @param ctx Koishi上下文
* @param keyword 搜索关键词
* @param options 搜索选项,可包含offset和what参数
* @returns 搜索结果数组,失败则返回空数组
*/
export declare function searchMcwikiPages(ctx: Context, keyword: string, options?: Record<string, any>): Promise<{
results: any;
pagination: {
totalResults: any;
offset: number;
nextOffset: number;
exhausted: boolean;
};
} | {
results: any[];
pagination: {
totalResults: number;
offset: number;
exhausted: boolean;
nextOffset?: undefined;
};
}>;
/**
* 获取Minecraft Wiki页面详情
* @param ctx Koishi上下文
* @param pageId 页面ID
* @param config 配置对象
* @returns 包含页面内容、URL和图标URL的对象,获取失败则返回null
*/
export declare function getMcwikiPage(ctx: Context, pageId: number, config: Config): Promise<{
content: (string | h)[];
url: any;
icon: any;
}>;
/**
* 注册mcwiki命令
* @param ctx Koishi上下文
* @param mc 命令对象
* @param config 机器人配置
*/
export declare function registerMcwiki(ctx: Context, mc: Command, config: Config): void;