koishi-plugin-mc-tools
Version:
我的世界(Minecraft)。可查询 MC 版本、服务器信息、玩家皮肤信息以及四大平台资源;支持管理服务器,功能梭哈
102 lines (101 loc) • 3.92 kB
TypeScript
import { Context, Command, h } from 'koishi';
import { Config } from '../index';
/**
* 搜索MCMOD资源
* @param {Context} ctx - Koishi上下文
* @param {string} keyword - 搜索关键词
* @param {Object} options - 搜索选项
* @param {number} [options.page] - 页码
* @param {number} [options.offset] - 偏移量
* @param {number} [options.mold] - 搜索模式
* @param {string} [options.type] - 资源类型
* @param {Config} [config] - 配置对象
* @returns {Promise<{results: Array<any>, pagination: Object}>} 搜索结果和分页信息
*/
export declare function searchMcmodProjects(ctx: Context, keyword: string, options?: {}, config?: Config): Promise<{
results: any;
pagination: {
page: any;
total: any;
totalResults: any;
pageSize: number;
offset: number;
};
}>;
/**
* 获取MCMOD资源详情
* @param {Context} ctx - Koishi上下文
* @param {Object} project - 项目信息
* @param {string} project.name - 项目名称
* @param {string} project.url - 项目URL
* @param {string} [project.description] - 项目描述
* @param {boolean} [project.community] - 是否获取社区信息
* @param {boolean} [project.relations] - 是否获取关联模组信息
* @param {Object} [project.extra] - 额外信息
* @param {Config} [config] - 配置对象
* @returns {Promise<{content: Array<any>, url: string, icon: string|null}>} 处理后的项目详情
*/
export declare function getMcmodProject(ctx: Context, project: any, config?: Config): Promise<{
content: (string | h)[];
url: any;
icon: any;
}>;
/**
* 获取MCMOD整合包详情
* @param {Context} ctx - Koishi上下文
* @param {Object} modpack - 整合包信息
* @param {string} modpack.name - 整合包名称
* @param {string} modpack.url - 整合包URL
* @param {string} [modpack.description] - 整合包描述
* @param {boolean} [modpack.community] - 是否获取社区信息
* @param {boolean} [modpack.relations] - 是否获取关联模组信息
* @param {Object} [modpack.extra] - 额外信息
* @param {Config} [config] - 配置对象
* @returns {Promise<{content: Array<any>, url: string, icon: string|null}>} 处理后的整合包详情
*/
export declare function getMcmodModpack(ctx: Context, modpack: any, config?: Config): Promise<{
content: (string | h)[];
url: any;
icon: any;
}>;
/**
* 获取MCMOD教程详情
* @param {Context} ctx - Koishi上下文
* @param {Object} post - 教程信息
* @param {string} post.name - 教程标题
* @param {string} post.url - 教程URL
* @param {string} [post.description] - 教程描述
* @param {boolean} [post.others] - 是否获取附加信息
* @param {Object} [post.extra] - 额外信息
* @param {Config} [config] - 配置对象
* @returns {Promise<{content: Array<any>, url: string, icon: string|null}>} 处理后的教程详情
*/
export declare function getMcmodPost(ctx: Context, post: any, config?: Config): Promise<{
content: string[];
url: any;
icon: any;
}>;
/**
* 获取MCMOD物品详情
* @param {Context} ctx - Koishi上下文
* @param {Object} item - 物品信息
* @param {string} item.name - 物品名称
* @param {string} item.url - 物品URL
* @param {string} [item.description] - 物品描述
* @param {boolean} [item.others] - 是否获取附加信息
* @param {Object} [item.extra] - 额外信息
* @param {Config} [config] - 配置对象
* @returns {Promise<{content: Array<any>, url: string, icon: string|null}>} 处理后的物品详情
*/
export declare function getMcmodItem(ctx: Context, item: any, config?: Config): Promise<{
content: any[];
url: any;
icon: any;
}>;
/**
* 注册MCMOD相关命令
* @param {Context} ctx - Koishi上下文
* @param {Command} mc - 父命令
* @param {Config} config - 配置对象
*/
export declare function registerMcmod(ctx: Context, mc: Command, config: Config): void;