nonebot-plugin-mccheck


Namenonebot-plugin-mccheck JSON
Version 0.1.41 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_time2025-01-01 14:20:18
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_plugin_mccheck/](https://github.com/molanp/zhenxun_plugin_mccheck)同步更新

## 💿 安装

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

<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] 支持互通服务器双次查询
- [x] 错误信息反馈
- [x] 端口自动补全
- [x] 智能判断IP地址是否正确
- [x] 不依赖任何外部api
- [x] 支持特殊端口查询(如`2`,`80`,`443`等)
- [x] 查询服务器favicon
- [x] 多语言
- [x] SRV支持
- [x] 完全彩色下划线/删除线
- [x] 获取服务器协议号

## 📑 未来的功能

- [ ] 敬请期待

## 🖼️ 效果图

v0.1.37
![v0.1.37](https://github.com/user-attachments/assets/619b9dc0-cda3-4949-9647-8f15e5db9ca5)

## ⚙️ 配置

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

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

## 🎲 消息类型对比

| 类型 | 特殊样式 | Favicon | 完全彩色下划线/删除线 | 全Unicode字体支持 |
|:-----:|:-----:|:-----:|:-----:|:-----:|
| 文本 | ❌ | ⭕ | ❌ | ⭕ |
| 图片 | ⭕ | ⭕ | ⭕ | ❌ |
| HTML | ⭕ | ⭕ | ⭕ | ⭕ |

## 🎉 使用

|命令|参数|范围|说明|
|:---:|:---:|:---:|:---:|
|`查服/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/ff/47/01b8ff0c14e42335331696a830a37eaeba3651f8d27b74f55ac59eaa005d/nonebot_plugin_mccheck-0.1.41.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_plugin_mccheck/](https://github.com/molanp/zhenxun_plugin_mccheck)\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\u548c\u73a9\u5bb6\u5217\u8868\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\u6301\u4e92\u901a\u670d\u52a1\u5668\u53cc\u6b21\u67e5\u8be2\n- [x] \u9519\u8bef\u4fe1\u606f\u53cd\u9988\n- [x] \u7aef\u53e3\u81ea\u52a8\u8865\u5168\n- [x] \u667a\u80fd\u5224\u65adIP\u5730\u5740\u662f\u5426\u6b63\u786e\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- [x] \u5b8c\u5168\u5f69\u8272\u4e0b\u5212\u7ebf/\u5220\u9664\u7ebf\n- [x] \u83b7\u53d6\u670d\u52a1\u5668\u534f\u8bae\u53f7\n\n## \ud83d\udcd1 \u672a\u6765\u7684\u529f\u80fd\n\n- [ ] \u656c\u8bf7\u671f\u5f85\n\n## \ud83d\uddbc\ufe0f \u6548\u679c\u56fe\n\nv0.1.37\n![v0.1.37](https://github.com/user-attachments/assets/619b9dc0-cda3-4949-9647-8f15e5db9ca5)\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\u6e32\u67d3\u56fe\u7247, `1`\u4e3a\u56fe\u7247, `2`\u4e3a\u6587\u672c) |\n\n## \ud83c\udfb2 \u6d88\u606f\u7c7b\u578b\u5bf9\u6bd4\n\n| \u7c7b\u578b | \u7279\u6b8a\u6837\u5f0f | Favicon | \u5b8c\u5168\u5f69\u8272\u4e0b\u5212\u7ebf/\u5220\u9664\u7ebf | \u5168Unicode\u5b57\u4f53\u652f\u6301 |\n|:-----:|:-----:|:-----:|:-----:|:-----:|\n| \u6587\u672c | \u274c | \u2b55 | \u274c | \u2b55 |\n| \u56fe\u7247 | \u2b55 | \u2b55 | \u2b55 | \u274c |\n| HTML | \u2b55 | \u2b55 | \u2b55 | \u2b55 |\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.41",
    "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": "af758253607367146422b8f58a1c98e8ca69998b7b4e011eefdd1588a823bd4b",
                "md5": "1c2e4251dbc496d8a38184daf2051aa3",
                "sha256": "65221d2fa54e539520dac8bd7721df2c0e478d664b4eab44df47805cb66c2ec7"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_mccheck-0.1.41-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1c2e4251dbc496d8a38184daf2051aa3",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 39222432,
            "upload_time": "2025-01-01T14:20:11",
            "upload_time_iso_8601": "2025-01-01T14:20:11.168525Z",
            "url": "https://files.pythonhosted.org/packages/af/75/8253607367146422b8f58a1c98e8ca69998b7b4e011eefdd1588a823bd4b/nonebot_plugin_mccheck-0.1.41-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ff4701b8ff0c14e42335331696a830a37eaeba3651f8d27b74f55ac59eaa005d",
                "md5": "c9ab5e69ad57076c5de850099aeee1f7",
                "sha256": "fa62bfb940fd7e6a2e42d522baa66653685e77091d0fce5272c227875fca8c19"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_mccheck-0.1.41.tar.gz",
            "has_sig": false,
            "md5_digest": "c9ab5e69ad57076c5de850099aeee1f7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 38979353,
            "upload_time": "2025-01-01T14:20:18",
            "upload_time_iso_8601": "2025-01-01T14:20:18.257266Z",
            "url": "https://files.pythonhosted.org/packages/ff/47/01b8ff0c14e42335331696a830a37eaeba3651f8d27b74f55ac59eaa005d/nonebot_plugin_mccheck-0.1.41.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-01 14:20:18",
    "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.39594s