diff --git a/README.md b/README.md index ebab026..dd89b20 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ _✨ Minecraft 服务器查询插件 ✨_ pypi-download-count +简体中文|[English](README_en.md) ## 📖 介绍 @@ -56,12 +57,12 @@ conda install nonebot-plugin-mccheck ``` 打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入 - - plugins = ["nonebot_plugin_mccheck"] - +```toml + plugin["nonebot_plugin_mccheck"] +``` -## 已实现的功能 +## 📈 已实现的功能 - [x] 适配Unicode全字体与字形 - [x] 渲染Motd样式 @@ -83,13 +84,13 @@ conda install nonebot-plugin-mccheck - [x] 多语言 - [x] SRV支持 -## 未来的功能 +## 📑 未来的功能 - [ ] 获取服务器协议号 - [ ] 获取服务器官网[如果存在] - [ ] 敬请期待 -## 效果图 +## 🖼️ 效果图 图片消息 ![pic](https://github.com/user-attachments/assets/abcda34f-0783-4c1e-b5c1-de9228047a69) @@ -107,6 +108,7 @@ HTML消息 | `MCC__TYPE` | 否 | `0` | 插件发送的消息类型(`0`为HTML, `1`为图片, `2`为文本) | ## 🎉 使用 + |命令|参数|范围|说明| |:---:|:---:|:---:|:---:| |`查服/mcheck`|`[ip]:[端口]` 或 `[ip]`|私聊/群聊|查询服务器状态| diff --git a/README_en.md b/README_en.md new file mode 100644 index 0000000..84f65b1 --- /dev/null +++ b/README_en.md @@ -0,0 +1,115 @@ +
+NoneBotPluginLogo +
+ +
+ +# nonebot-plugin-mccheck + +_✨ Minecraft Server Query Plug-in_ + + +license + + +pypi + +python +pypi-download-count +
+ +English|[简体中文](README.md) + +## 📖 Introduction + +Minecraft server status query, supporting IPv6. + +> update synchronously with [https://github.com/molanp/zhenxun_check_minecraft/](https://github.com/molanp/zhenxun_check_minecraft). + +## 💿 Installation + +One of the methods mentioned below can be selected. + +
+[recommended] install using nb-cli +Open the command line in the root directory of Bot and enter the following instructions to install. + +```shell +nb plugin install nonebot-plugin-mccheck +``` + +
+ +
+ install using package manager +In the plug-in directory of the nonebot2 project, open the command line and enter the corresponding installation command according to the package manager you use. + +```shell +pip install nonebot-plugin-mccheck +# or +pdm add nonebot-plugin-mccheck +# or +poetry add nonebot-plugin-mccheck +# or +conda install nonebot-plugin-mccheck +``` + +Open the `pyproject.toml` file in the root directory of the nonebot2 project, and write in the ` [tool.nonebot] ` section. +```toml +plugins = ["nonebot_plugin_mccheck"] +``` +
+ +## 📈 Implemented functions + +- [x] Adapted unicode full fonts and glyphs +- [x] Render Motd styles +- [x] Query server nickname +- [x] Query the maximum number of servers, the current number of people +- [x] Query server motd +- [x] returns the server address and port +- [x] Returns the server online status +- [x] Query server latency +- [x] More precise delay +- [x] UDP server is supported +- [x] Error message feedback +- [x] Port autocompletion +- [x] Wisdom~~Barrier~~ can determine whether the IP address is correct +- [x] Get the JSON version of the server motd (only if the server motd is set to JSON format) +- [x] Does not depend on any external API :) +- [x] Support special port queries (e.g. `2`, `80`, `443` etc.) +- [x] Query server favicon +- [x] Multilingual +- [x] SRV support + +## 📑 Future functions + +- [ ] Get server protocol number +- [ ] Get server official website (if any) +- [ ] And more... + +## 🖼️ Test screenshot + +Picture Message +![pic](https://github.com/user-attachments/assets/abcda34f-0783-4c1e-b5c1-de9228047a69) + +HTML Message +![html](https://github.com/user-attachments/assets/18069f2a-4f7e-4994-837b-2b9e0cbf1f74) + +## ⚙️ Configuration + +Add the required configuration in the following table to the `.env` file of the nonebot2 project. + +| Configuration Item | Required | Default Value | Description | +|:-----:|:----:|:----:|:----:| +| `MCC__LANGUAGE` | False | `zh-cn` | Languages used by the plugin to render images
Available languages: [`zh-cn`,`zh-tw`,`en`] | +| `MCC__TYPE` | False | `0` | The type of message the plugin sends (`0` for HTML, `1` for image, `2` for text) | + + +## 🎉 Usage +| Command | Parameter | Scope | Description | +|:-------:|:---------:|:-----:|:-----------:| +| `mcheck` | `[ip]:[port]` or `[ip]` | Private/Group Chat | Check Minecraft server status | +| `set_lang` | Language name | Private/Group Chat | Set the language used by the plugin for rendering images | +| `lang_now` | None | Private/Group Chat | View the current language used by the plugin for rendering images | +| `lang_list` | None | Private/Group Chat | View the list of languages supported by the plugin |