koishi-plugin-mc-tools
Version:
我的世界(Minecraft)。可查询 MC 版本、服务器信息、玩家皮肤信息以及四大平台资源;支持管理服务器,功能梭哈
37 lines (36 loc) • 1.4 kB
TypeScript
import { Context, Command, h } from 'koishi';
import { Config } from '../index';
/**
* 在Modrinth搜索项目
* @param {Context} ctx - Koishi上下文
* @param {string} keyword - 搜索关键词
* @param {Object} options - 搜索选项
* @returns {Promise<Array>} 搜索结果
*/
export declare function searchModrinthProjects(ctx: Context, keyword: string, options?: {}): Promise<any>;
/**
* 获取Modrinth项目依赖关系
* @param {Context} ctx - Koishi上下文
* @param {string} projectId - 项目ID或slug
* @returns {Promise<Object|null>} 依赖关系数据
*/
export declare function getModrinthDependencies(ctx: Context, projectId: string): Promise<any>;
/**
* 获取Modrinth项目详情
* @param {Context} ctx - Koishi上下文
* @param {string} projectId - 项目ID
* @param {Config} config - 配置对象
* @param {boolean} showDependencies - 是否显示依赖关系
* @returns {Promise<Object|null>} 项目详情,包含content和url
*/
export declare function getModrinthProject(ctx: Context, projectId: string, config: Config, showDependencies?: boolean): Promise<{
content: (string | h)[];
url: string;
}>;
/**
* 注册Modrinth命令
* @param {Context} ctx - Koishi上下文
* @param {Command} mc - 父命令对象
* @param {Config} config - 配置对象
*/
export declare function registerModrinth(ctx: Context, mc: Command, config: Config): void;