Skip to main content

通过 https://www.mcmod.cn 获取模组、整合包、教程等信息。

Project description

nonebot-plugin-mcmod

LICENSE PyPI Python NoneBot

基于 NoneBot2 的 模组百科 (MCMOD) 查询插件

📖 介绍

一个简单的 NoneBot2 插件,用于在 https://www.mcmod.cn (我的世界百科) 搜索模组、整合包、教程和资料等信息。

通过指令在 QQ 群从查询 Minecraft 中文模组百科相关内容。以转发消息的形式展示搜索信息,目前支持搜索、标题、正文文本和图片内容获取。

示例

💿 安装(暂未上架,请先使用 clone 方式安装)

使用 git:

git clone https://github.com/chrysoljq/nonebot-plugin-mcmod

然后将 nonebot-plugin-mcmod/nonebot_plugin_mcmod 复制到你的插件目录下。

使用 pip:

pip install nonebot_plugin_mcmod

使用 nb-cli:

nb plugin install nonebot_plugin_mcmod

安装后,请在你的 bot.pypyproject.toml 中加载插件:

# bot.py
nonebot.load_plugin("nonebot_plugin_mcmod")
# pyproject.toml
[tool.nonebot]
plugins = ["nonebot_plugin_mcmod"]

🚀 使用

指令格式:

#百科[分类] <关键词> [序号]

若无序号,则会等待用户下一次数字输入

参数说明:

  • [分类]: 可选参数,用于指定搜索范围。可选值为 整合包, 模组, 教程, 资料。如果省略,则在所有分类中搜索。
  • <关键词>: 必填参数,你要搜索的内容。可以包含空格。
  • [序号]: 可选参数,当搜索结果多于一个时,可以通过序号选择查看特定结果的详细信息(序号从 1 开始)。

示例:

  • #百科模组 工业 - 搜索分类为“模组”,关键词为“工业”的内容。
  • #百科整合包 石头世界 - 搜索分类为“整合包”,关键词为“石头世界”的内容。
  • #百科 巫妖 恐怖生物 - 在所有分类中搜索关键词为“巫妖 恐怖生物”的内容。
  • #百科 暮色森林 2 - 查看“暮色森林”搜索结果中的第 2 条详细信息。

📝 TODO

  • 获取整合包/模组支持的 Minecraft 版本信息。
  • 完善搜索结果中的图片爬取与展示。
  • 增加配置项,例如结果数量限制等。
  • 为对话流程添加超时机制
  • 控制消息长度

🙏 致谢

📄 开源许可

本项目使用 MIT License 开源。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_mcmod-1.3.5.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_mcmod-1.3.5-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_mcmod-1.3.5.tar.gz.

File metadata

  • Download URL: nonebot_plugin_mcmod-1.3.5.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.10.17 Linux/6.8.0-1021-azure

File hashes

Hashes for nonebot_plugin_mcmod-1.3.5.tar.gz
Algorithm Hash digest
SHA256 a78f876bbe2453ea5a1d21ca269334afbad4e2701d57e890316d421dfc7d7f2c
MD5 eb51411a1e03e3936f8a333b97146423
BLAKE2b-256 742d587847f59a6056238657a887e58043225032d2af6f7158271fd1c73c7ca8

See more details on using hashes here.

File details

Details for the file nonebot_plugin_mcmod-1.3.5-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_mcmod-1.3.5-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.10.17 Linux/6.8.0-1021-azure

File hashes

Hashes for nonebot_plugin_mcmod-1.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4b3fb7ccd845015ba054db60c50a693da70f00caa1e23b46e5fc35d9b77b1233
MD5 0fe6ffd795d73f489f60658e191e0447
BLAKE2b-256 98fa77e781a83c36cdefbd4badc47683ff5eeb189aeb4c5e669e0ecdb716c045

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page