nonebot-plugin-mccheck


Namenonebot-plugin-mccheck JSON
Version 0.1.28 PyPI version JSON
download
home_pagehttps://github.com/molanp/nonebot_plugin_mccheck
SummaryMinecraft服务器状态查询的nonebot插件,支持IPv6/Minecraft server status query plugin for nonebot, IPv6 supported
upload_time2024-09-27 14:19:27
maintainerNone
docs_urlNone
authormolanp
requires_pythonNone
licenseGPL-3.0
keywords nonebot nonebot2 minecraft i18n inquire checker server
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <a href="https://v2.nonebot.dev/store"><img src="https://github.com/KomoriDev/nonebot-plugin-kawaii-status/raw/master/docs/NoneBotPlugin.svg" alt="NoneBotPluginLogo"></a>
</div>

<div align="center">

# nonebot-plugin-mccheck


_✨ Minecraft 服务器查询插件 ✨_


<a href="./LICENSE">
    <img src="https://img.shields.io/github/license/molanp/nonebot_plugin_mccheck.svg" alt="license">
</a>
<a href="https://pypi.python.org/pypi/nonebot-plugin-mccheck">
    <img src="https://img.shields.io/pypi/v/nonebot-plugin-mccheck.svg" alt="pypi">
</a>
<img src="https://img.shields.io/badge/python-3.9+-blue.svg" alt="python">
<img src="https://img.shields.io/pypi/dm/nonebot-plugin-mccheck" alt="pypi-download-count">
</div>

简体中文|[English](README_en.md)

## 📖 介绍

Minecraft服务器状态查询,支持IPv6

> 与[https://github.com/molanp/zhenxun_check_Minecraft/](https://github.com/molanp/zhenxun_check_Minecraft)同步更新

## 💿 安装

以下提到的方法任选 **其一** 即可

<details open>
<summary>[推荐]使用 nb-cli 安装</summary>
在 Bot 的根目录下打开命令行, 输入以下指令即可安装

```shell
nb plugin install nonebot-plugin-mccheck
```

</details>

<details>
<summary>使用包管理器安装</summary>
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令

```shell
pip install nonebot-plugin-mccheck
# or
pdm add nonebot-plugin-mccheck
# or
poetry add nonebot-plugin-mccheck
# or
conda install nonebot-plugin-mccheck
```

打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
```toml
    plugin["nonebot_plugin_mccheck"]
```
</details>

## 📈 已实现的功能

- [x] 支持全平台适配器
- [x] 适配Unicode全字体与字形
- [x] 渲染Motd样式
- [x] 查询服务器昵称
- [x] 查询服务器最大人数,当前人数
- [x] 查询服务器motd
- [x] 返回服务器地址及端口
- [x] 返回服务器在线状态
- [x] 查询服务器延迟
- [x] 更精确的延迟
- [x] 支持UDP服务器
- [x] 错误信息反馈
- [x] 端口自动补全
- [x] 智~~障~~能判断IP地址是否正确
- [x] 获取服务器motd的json版本(仅当服务器motd设置为json格式时)
- [x] 不依赖任何外部api
- [x] 支持特殊端口查询(如`2`,`80`,`443`等)
- [x] 查询服务器favicon
- [x] 多语言
- [x] SRV支持

## 📑 未来的功能

- [ ] 获取服务器协议号
- [ ] 获取服务器官网[如果存在]
- [ ] 敬请期待

## 🖼️ 效果图

v0.1.22

文本消息
![0.1.22 text](https://github.com/user-attachments/assets/7099ded9-9c8c-482f-89e5-a68bd014e67a)

图片消息
![0.1.22 pic](https://github.com/user-attachments/assets/3ba422a4-bc41-4401-85c7-f5da2f693b03)

HTML消息
![0.1.22 html](https://github.com/user-attachments/assets/09396694-16a4-4907-8b25-3863b181a725)

互通服(不止支持HTML消息,此处仅展示一种)
![0.1.22 geyser](https://github.com/user-attachments/assets/3982c18a-7cc5-4eb2-9f0f-9ec2a16fed2f)


## ⚙️ 配置

在 nonebot2 项目的`.env`文件中添加下表中的必填配置

| 配置项 | 必填 | 默认值 | 说明 |
|:-----:|:----:|:----:|:----:|
| `MCC__LANGUAGE` | 否 | `zh-cn` | 插件渲染图片所使用的语言<br>可用语言:[`zh-cn`,`zh-tw`,`en`] |
| `MCC__TYPE` | 否 | `0` | 插件发送的消息类型(`0`为HTML, `1`为图片, `2`为文本) |

## 🎉 使用

|命令|参数|范围|说明|
|:---:|:---:|:---:|:---:|
|`查服/mcheck`|`[ip]:[端口]` 或 `[ip]`|私聊/群聊|查询服务器状态|
|`设置语言/set_lang`|语言名称|私聊/群聊|设置插件渲染图片所使用的语言|
|`当前语言/lang_now`|无|私聊/群聊|查看当前插件渲染图片所使用的语言|
|`语言列表/lang_list`|无|私聊/群聊|查看插件支持的语言列表|



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/molanp/nonebot_plugin_mccheck",
    "name": "nonebot-plugin-mccheck",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "nonebot, nonebot2, minecraft, i18n, inquire, checker, server",
    "author": "molanp",
    "author_email": "luotian233@foxmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bb/f8/f2b70dd4f403199a336333fa882f462a3c196f3df2f9c836c8ef47d6df20/nonebot_plugin_mccheck-0.1.28.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <a href=\"https://v2.nonebot.dev/store\"><img src=\"https://github.com/KomoriDev/nonebot-plugin-kawaii-status/raw/master/docs/NoneBotPlugin.svg\" alt=\"NoneBotPluginLogo\"></a>\n</div>\n\n<div align=\"center\">\n\n# nonebot-plugin-mccheck\n\n\n_\u2728 Minecraft \u670d\u52a1\u5668\u67e5\u8be2\u63d2\u4ef6 \u2728_\n\n\n<a href=\"./LICENSE\">\n    <img src=\"https://img.shields.io/github/license/molanp/nonebot_plugin_mccheck.svg\" alt=\"license\">\n</a>\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-mccheck\">\n    <img src=\"https://img.shields.io/pypi/v/nonebot-plugin-mccheck.svg\" alt=\"pypi\">\n</a>\n<img src=\"https://img.shields.io/badge/python-3.9+-blue.svg\" alt=\"python\">\n<img src=\"https://img.shields.io/pypi/dm/nonebot-plugin-mccheck\" alt=\"pypi-download-count\">\n</div>\n\n\u7b80\u4f53\u4e2d\u6587|[English](README_en.md)\n\n## \ud83d\udcd6 \u4ecb\u7ecd\n\nMinecraft\u670d\u52a1\u5668\u72b6\u6001\u67e5\u8be2\uff0c\u652f\u6301IPv6\n\n> \u4e0e[https://github.com/molanp/zhenxun_check_Minecraft/](https://github.com/molanp/zhenxun_check_Minecraft)\u540c\u6b65\u66f4\u65b0\n\n## \ud83d\udcbf \u5b89\u88c5\n\n\u4ee5\u4e0b\u63d0\u5230\u7684\u65b9\u6cd5\u4efb\u9009 **\u5176\u4e00** \u5373\u53ef\n\n<details open>\n<summary>[\u63a8\u8350]\u4f7f\u7528 nb-cli \u5b89\u88c5</summary>\n\u5728 Bot \u7684\u6839\u76ee\u5f55\u4e0b\u6253\u5f00\u547d\u4ee4\u884c, \u8f93\u5165\u4ee5\u4e0b\u6307\u4ee4\u5373\u53ef\u5b89\u88c5\n\n```shell\nnb plugin install nonebot-plugin-mccheck\n```\n\n</details>\n\n<details>\n<summary>\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u5b89\u88c5</summary>\n\u5728 nonebot2 \u9879\u76ee\u7684\u63d2\u4ef6\u76ee\u5f55\u4e0b, \u6253\u5f00\u547d\u4ee4\u884c, \u6839\u636e\u4f60\u4f7f\u7528\u7684\u5305\u7ba1\u7406\u5668, \u8f93\u5165\u76f8\u5e94\u7684\u5b89\u88c5\u547d\u4ee4\n\n```shell\npip install nonebot-plugin-mccheck\n# or\npdm add nonebot-plugin-mccheck\n# or\npoetry add nonebot-plugin-mccheck\n# or\nconda install nonebot-plugin-mccheck\n```\n\n\u6253\u5f00 nonebot2 \u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684 `pyproject.toml` \u6587\u4ef6, \u5728 `[tool.nonebot]` \u90e8\u5206\u8ffd\u52a0\u5199\u5165\n```toml\n    plugin[\"nonebot_plugin_mccheck\"]\n```\n</details>\n\n## \ud83d\udcc8 \u5df2\u5b9e\u73b0\u7684\u529f\u80fd\n\n- [x] \u652f\u6301\u5168\u5e73\u53f0\u9002\u914d\u5668\n- [x] \u9002\u914dUnicode\u5168\u5b57\u4f53\u4e0e\u5b57\u5f62\n- [x] \u6e32\u67d3Motd\u6837\u5f0f\n- [x] \u67e5\u8be2\u670d\u52a1\u5668\u6635\u79f0\n- [x] \u67e5\u8be2\u670d\u52a1\u5668\u6700\u5927\u4eba\u6570,\u5f53\u524d\u4eba\u6570\n- [x] \u67e5\u8be2\u670d\u52a1\u5668motd\n- [x] \u8fd4\u56de\u670d\u52a1\u5668\u5730\u5740\u53ca\u7aef\u53e3\n- [x] \u8fd4\u56de\u670d\u52a1\u5668\u5728\u7ebf\u72b6\u6001\n- [x] \u67e5\u8be2\u670d\u52a1\u5668\u5ef6\u8fdf\n- [x] \u66f4\u7cbe\u786e\u7684\u5ef6\u8fdf\n- [x] \u652f\u6301UDP\u670d\u52a1\u5668\n- [x] \u9519\u8bef\u4fe1\u606f\u53cd\u9988\n- [x] \u7aef\u53e3\u81ea\u52a8\u8865\u5168\n- [x] \u667a~~\u969c~~\u80fd\u5224\u65adIP\u5730\u5740\u662f\u5426\u6b63\u786e\n- [x] \u83b7\u53d6\u670d\u52a1\u5668motd\u7684json\u7248\u672c(\u4ec5\u5f53\u670d\u52a1\u5668motd\u8bbe\u7f6e\u4e3ajson\u683c\u5f0f\u65f6)\n- [x] \u4e0d\u4f9d\u8d56\u4efb\u4f55\u5916\u90e8api\n- [x] \u652f\u6301\u7279\u6b8a\u7aef\u53e3\u67e5\u8be2(\u5982`2`,`80`,`443`\u7b49)\n- [x] \u67e5\u8be2\u670d\u52a1\u5668favicon\n- [x] \u591a\u8bed\u8a00\n- [x] SRV\u652f\u6301\n\n## \ud83d\udcd1 \u672a\u6765\u7684\u529f\u80fd\n\n- [ ] \u83b7\u53d6\u670d\u52a1\u5668\u534f\u8bae\u53f7\n- [ ] \u83b7\u53d6\u670d\u52a1\u5668\u5b98\u7f51[\u5982\u679c\u5b58\u5728]\n- [ ] \u656c\u8bf7\u671f\u5f85\n\n## \ud83d\uddbc\ufe0f \u6548\u679c\u56fe\n\nv0.1.22\n\n\u6587\u672c\u6d88\u606f\n![0.1.22 text](https://github.com/user-attachments/assets/7099ded9-9c8c-482f-89e5-a68bd014e67a)\n\n\u56fe\u7247\u6d88\u606f\n![0.1.22 pic](https://github.com/user-attachments/assets/3ba422a4-bc41-4401-85c7-f5da2f693b03)\n\nHTML\u6d88\u606f\n![0.1.22 html](https://github.com/user-attachments/assets/09396694-16a4-4907-8b25-3863b181a725)\n\n\u4e92\u901a\u670d(\u4e0d\u6b62\u652f\u6301HTML\u6d88\u606f\uff0c\u6b64\u5904\u4ec5\u5c55\u793a\u4e00\u79cd)\n![0.1.22 geyser](https://github.com/user-attachments/assets/3982c18a-7cc5-4eb2-9f0f-9ec2a16fed2f)\n\n\n## \u2699\ufe0f \u914d\u7f6e\n\n\u5728 nonebot2 \u9879\u76ee\u7684`.env`\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4e0b\u8868\u4e2d\u7684\u5fc5\u586b\u914d\u7f6e\n\n| \u914d\u7f6e\u9879 | \u5fc5\u586b | \u9ed8\u8ba4\u503c | \u8bf4\u660e |\n|:-----:|:----:|:----:|:----:|\n| `MCC__LANGUAGE` | \u5426 | `zh-cn` | \u63d2\u4ef6\u6e32\u67d3\u56fe\u7247\u6240\u4f7f\u7528\u7684\u8bed\u8a00<br>\u53ef\u7528\u8bed\u8a00:[`zh-cn`,`zh-tw`,`en`] |\n| `MCC__TYPE` | \u5426 | `0` | \u63d2\u4ef6\u53d1\u9001\u7684\u6d88\u606f\u7c7b\u578b(`0`\u4e3aHTML, `1`\u4e3a\u56fe\u7247, `2`\u4e3a\u6587\u672c) |\n\n## \ud83c\udf89 \u4f7f\u7528\n\n|\u547d\u4ee4|\u53c2\u6570|\u8303\u56f4|\u8bf4\u660e|\n|:---:|:---:|:---:|:---:|\n|`\u67e5\u670d/mcheck`|`[ip]:[\u7aef\u53e3]` \u6216 `[ip]`|\u79c1\u804a/\u7fa4\u804a|\u67e5\u8be2\u670d\u52a1\u5668\u72b6\u6001|\n|`\u8bbe\u7f6e\u8bed\u8a00/set_lang`|\u8bed\u8a00\u540d\u79f0|\u79c1\u804a/\u7fa4\u804a|\u8bbe\u7f6e\u63d2\u4ef6\u6e32\u67d3\u56fe\u7247\u6240\u4f7f\u7528\u7684\u8bed\u8a00|\n|`\u5f53\u524d\u8bed\u8a00/lang_now`|\u65e0|\u79c1\u804a/\u7fa4\u804a|\u67e5\u770b\u5f53\u524d\u63d2\u4ef6\u6e32\u67d3\u56fe\u7247\u6240\u4f7f\u7528\u7684\u8bed\u8a00|\n|`\u8bed\u8a00\u5217\u8868/lang_list`|\u65e0|\u79c1\u804a/\u7fa4\u804a|\u67e5\u770b\u63d2\u4ef6\u652f\u6301\u7684\u8bed\u8a00\u5217\u8868|\n\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "Minecraft\u670d\u52a1\u5668\u72b6\u6001\u67e5\u8be2\u7684nonebot\u63d2\u4ef6\uff0c\u652f\u6301IPv6/Minecraft server status query plugin for nonebot, IPv6 supported",
    "version": "0.1.28",
    "project_urls": {
        "Homepage": "https://github.com/molanp/nonebot_plugin_mccheck",
        "Repository": "https://github.com/molanp/nonebot_plugin_mccheck"
    },
    "split_keywords": [
        "nonebot",
        " nonebot2",
        " minecraft",
        " i18n",
        " inquire",
        " checker",
        " server"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e2bd2bd824cffa5175cf9899c6f7720e6e30e511fd264188e292d4fe9454ce21",
                "md5": "e3a7e17b688a0a864b9927e56ec5fe16",
                "sha256": "2a010eaa4b03f76f130e74df5215748fd144efda68f1e35b86fefdb466996ee3"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_mccheck-0.1.28-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e3a7e17b688a0a864b9927e56ec5fe16",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 39221707,
            "upload_time": "2024-09-27T14:19:23",
            "upload_time_iso_8601": "2024-09-27T14:19:23.058353Z",
            "url": "https://files.pythonhosted.org/packages/e2/bd/2bd824cffa5175cf9899c6f7720e6e30e511fd264188e292d4fe9454ce21/nonebot_plugin_mccheck-0.1.28-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bbf8f2b70dd4f403199a336333fa882f462a3c196f3df2f9c836c8ef47d6df20",
                "md5": "0bbf1a96135e650164b132da82caba92",
                "sha256": "1edb87b8193a67d436bb58b60c9a78d10bc82445cdc8c273ac2927f19b74db15"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_mccheck-0.1.28.tar.gz",
            "has_sig": false,
            "md5_digest": "0bbf1a96135e650164b132da82caba92",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 38978648,
            "upload_time": "2024-09-27T14:19:27",
            "upload_time_iso_8601": "2024-09-27T14:19:27.534482Z",
            "url": "https://files.pythonhosted.org/packages/bb/f8/f2b70dd4f403199a336333fa882f462a3c196f3df2f9c836c8ef47d6df20/nonebot_plugin_mccheck-0.1.28.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-27 14:19:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "molanp",
    "github_project": "nonebot_plugin_mccheck",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nonebot-plugin-mccheck"
}
        
Elapsed time: 0.38149s