<div align="center">
<a href="https://v2.nonebot.dev/store"><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
<br>
<p><img src="https://ddnet.org/ddnet.svg" width="240" alt="NoneBotPluginText"></p>
</div>
<div align="center">
# nonebot-plugin-ddrace
_✨ 提供 DDNet 成绩查询功能 ✨_
<a href="./LICENSE">
<img src="https://img.shields.io/github/license/gongfuture/nonebot-plugin-ddrace.svg?style=for-the-badge" alt="license">
</a>
<img src="https://img.shields.io/badge/python-3.9+-blue.svg?style=for-the-badge" alt="python">
<a href="https://pypi.python.org/pypi/nonebot-plugin-ddrace">
<img src="https://img.shields.io/pypi/v/nonebot-plugin-ddrace.svg?style=for-the-badge" alt="pypi">
</a>
<a href="https://www.codefactor.io/repository/github/gongfuture/nonebot-plugin-ddrace">
<img src="https://img.shields.io/codefactor/grade/github/gongfuture/nonebot-plugin-ddrace?style=for-the-badge">
</a>
<a href="https://github.com/gongfuture/nonebot-plugin-ddrace/commits/main">
<img src="https://img.shields.io/github/last-commit/gongfuture/nonebot-plugin-ddrace?style=for-the-badge">
</a>
<a href="https://wakatime.com/@gongfuture"><img src="https://wakatime.com/badge/github/gongfuture/nonebot-plugin-ddrace.svg?style=for-the-badge" /></a>
<a href="https://qm.qq.com/q/OfK3d9r6o2"><img src="https://img.shields.io/badge/QQ群-611124274-blue?logo=tencentqq&style=for-the-badge" /></a>
</div>
## 📖 介绍
这是一个 nonebot2 插件,提供 DDNet 成绩查询功能
可以查询玩家的成绩, ~~服务器的状态等信息(还没写好),~~ 使用图片发送(这个真有)
Python新手项目,代码质量低,欢迎各位大佬指导/PR
## 💿 安装
<details open>
<summary>使用 nb-cli 安装</summary>
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-ddrace
</details>
<details>
<summary>使用包管理器安装</summary>
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
<details>
<summary>pip</summary>
pip install nonebot-plugin-ddrace
</details>
<details>
<summary>pdm</summary>
pdm add nonebot-plugin-ddrace
</details>
<details>
<summary>poetry</summary>
poetry add nonebot-plugin-ddrace
</details>
<details>
<summary>conda</summary>
conda install nonebot-plugin-ddrace
</details>
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
plugins = ["nonebot_plugin_ddrace"]
</details>
## ⚙️ 配置
在 nonebot2 项目的`.env`文件中添加下表中的必填配置
| 配置项 | 必填 | 类型 | 默认值 | 说明 |
| :-----: | :---: | :---: | :----: | :------: |
| ddr_need_at | 否 | Bool| False | 是否需要at bot触发指令 |
| ddr_at_back | 否 | Bool| False | 是否at回发送指令者 |
| ddr_reply | 否 | Bool| False | 是否引用指令消息 |
| ddr_priority | 否 | Int | 10 | 优先级,越小越优先,最低为1 |
<!-- | ddr_command_pre_alias | 否 | Str | "" | 指令前缀别名,用于和其他插件指令防撞 | -->
| ddr_cache_time | 否 | Int | 60 | 缓存时间,单位为分钟,为 0 时不缓存 |
## 🎉 使用
### 指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
| :---: | :---: | :---: | :---: | :------: |
| points | 群员 | 跟随全局 | 群聊,私聊 | 查询{name}的成绩图 |
| fpoints| 群员 | 跟随全局 | 群聊,私聊 | 查询{name}的成绩图(不使用缓存) |
### 效果图
如果有效果图的话
Raw data
{
"_id": null,
"home_page": "https://github.com/gongfuture/nonebot-plugin-ddrace",
"name": "nonebot-plugin-ddrace",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>3.9",
"maintainer_email": null,
"keywords": "bot, qq, qqbot, onebotv11, onebot, nonebot2, nonebot, ddrace, ddnet",
"author": "gongfuture",
"author_email": "gongfuture@outlook.com",
"download_url": "https://files.pythonhosted.org/packages/1c/54/262e7f01c3f1b9565d39c46f89b04f3ac0880ce1e3d958844ceffc985c3a/nonebot_plugin_ddrace-0.0.6.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n <a href=\"https://v2.nonebot.dev/store\"><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\"></a>\n <br>\n <p><img src=\"https://ddnet.org/ddnet.svg\" width=\"240\" alt=\"NoneBotPluginText\"></p>\n</div>\n\n<div align=\"center\">\n\n# nonebot-plugin-ddrace\n\n_\u2728 \u63d0\u4f9b DDNet \u6210\u7ee9\u67e5\u8be2\u529f\u80fd \u2728_\n\n\n<a href=\"./LICENSE\">\n <img src=\"https://img.shields.io/github/license/gongfuture/nonebot-plugin-ddrace.svg?style=for-the-badge\" alt=\"license\">\n</a>\n<img src=\"https://img.shields.io/badge/python-3.9+-blue.svg?style=for-the-badge\" alt=\"python\">\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-ddrace\">\n <img src=\"https://img.shields.io/pypi/v/nonebot-plugin-ddrace.svg?style=for-the-badge\" alt=\"pypi\">\n</a>\n<a href=\"https://www.codefactor.io/repository/github/gongfuture/nonebot-plugin-ddrace\">\n<img src=\"https://img.shields.io/codefactor/grade/github/gongfuture/nonebot-plugin-ddrace?style=for-the-badge\">\n</a>\n<a href=\"https://github.com/gongfuture/nonebot-plugin-ddrace/commits/main\">\n<img src=\"https://img.shields.io/github/last-commit/gongfuture/nonebot-plugin-ddrace?style=for-the-badge\">\n</a>\n<a href=\"https://wakatime.com/@gongfuture\"><img src=\"https://wakatime.com/badge/github/gongfuture/nonebot-plugin-ddrace.svg?style=for-the-badge\" /></a>\n<a href=\"https://qm.qq.com/q/OfK3d9r6o2\"><img src=\"https://img.shields.io/badge/QQ\u7fa4-611124274-blue?logo=tencentqq&style=for-the-badge\" /></a>\n\n\n</div>\n\n\n## \ud83d\udcd6 \u4ecb\u7ecd\n\n\u8fd9\u662f\u4e00\u4e2a nonebot2 \u63d2\u4ef6\uff0c\u63d0\u4f9b DDNet \u6210\u7ee9\u67e5\u8be2\u529f\u80fd\n\u53ef\u4ee5\u67e5\u8be2\u73a9\u5bb6\u7684\u6210\u7ee9\uff0c ~~\u670d\u52a1\u5668\u7684\u72b6\u6001\u7b49\u4fe1\u606f(\u8fd8\u6ca1\u5199\u597d)\uff0c~~ \u4f7f\u7528\u56fe\u7247\u53d1\u9001(\u8fd9\u4e2a\u771f\u6709)\n\nPython\u65b0\u624b\u9879\u76ee\uff0c\u4ee3\u7801\u8d28\u91cf\u4f4e\uff0c\u6b22\u8fce\u5404\u4f4d\u5927\u4f6c\u6307\u5bfc/PR\n\n## \ud83d\udcbf \u5b89\u88c5\n\n<details open>\n<summary>\u4f7f\u7528 nb-cli \u5b89\u88c5</summary>\n\u5728 nonebot2 \u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u6253\u5f00\u547d\u4ee4\u884c, \u8f93\u5165\u4ee5\u4e0b\u6307\u4ee4\u5373\u53ef\u5b89\u88c5\n\n nb plugin install nonebot-plugin-ddrace\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<details>\n<summary>pip</summary>\n\n pip install nonebot-plugin-ddrace\n</details>\n<details>\n<summary>pdm</summary>\n\n pdm add nonebot-plugin-ddrace\n</details>\n<details>\n<summary>poetry</summary>\n\n poetry add nonebot-plugin-ddrace\n</details>\n<details>\n<summary>conda</summary>\n\n conda install nonebot-plugin-ddrace\n</details>\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\n plugins = [\"nonebot_plugin_ddrace\"]\n\n</details>\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 | \u7c7b\u578b | \u9ed8\u8ba4\u503c | \u8bf4\u660e |\n| :-----: | :---: | :---: | :----: | :------: |\n| ddr_need_at | \u5426 | Bool| False | \u662f\u5426\u9700\u8981at bot\u89e6\u53d1\u6307\u4ee4 |\n| ddr_at_back | \u5426 | Bool| False | \u662f\u5426at\u56de\u53d1\u9001\u6307\u4ee4\u8005 |\n| ddr_reply | \u5426 | Bool| False | \u662f\u5426\u5f15\u7528\u6307\u4ee4\u6d88\u606f |\n| ddr_priority | \u5426 | Int | 10 | \u4f18\u5148\u7ea7\uff0c\u8d8a\u5c0f\u8d8a\u4f18\u5148\uff0c\u6700\u4f4e\u4e3a1 |\n<!-- | ddr_command_pre_alias | \u5426 | Str | \"\" | \u6307\u4ee4\u524d\u7f00\u522b\u540d\uff0c\u7528\u4e8e\u548c\u5176\u4ed6\u63d2\u4ef6\u6307\u4ee4\u9632\u649e | -->\n| ddr_cache_time | \u5426 | Int | 60 | \u7f13\u5b58\u65f6\u95f4\uff0c\u5355\u4f4d\u4e3a\u5206\u949f\uff0c\u4e3a 0 \u65f6\u4e0d\u7f13\u5b58 |\n\n## \ud83c\udf89 \u4f7f\u7528\n### \u6307\u4ee4\u8868\n| \u6307\u4ee4 | \u6743\u9650 | \u9700\u8981@ | \u8303\u56f4 | \u8bf4\u660e |\n| :---: | :---: | :---: | :---: | :------: |\n| points | \u7fa4\u5458 | \u8ddf\u968f\u5168\u5c40 | \u7fa4\u804a\uff0c\u79c1\u804a | \u67e5\u8be2{name}\u7684\u6210\u7ee9\u56fe |\n| fpoints| \u7fa4\u5458 | \u8ddf\u968f\u5168\u5c40 | \u7fa4\u804a\uff0c\u79c1\u804a | \u67e5\u8be2{name}\u7684\u6210\u7ee9\u56fe(\u4e0d\u4f7f\u7528\u7f13\u5b58) |\n### \u6548\u679c\u56fe\n\u5982\u679c\u6709\u6548\u679c\u56fe\u7684\u8bdd\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "\u63d0\u4f9b DDNet \u6210\u7ee9\u67e5\u8be2\u529f\u80fd",
"version": "0.0.6",
"project_urls": {
"Bug Tracker": "https://github.com/gongfuture/nonebot-plugin-ddrace/issues",
"Homepage": "https://github.com/gongfuture/nonebot-plugin-ddrace",
"Repository": "https://github.com/gongfuture/nonebot-plugin-ddrace"
},
"split_keywords": [
"bot",
" qq",
" qqbot",
" onebotv11",
" onebot",
" nonebot2",
" nonebot",
" ddrace",
" ddnet"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c08b08a07055eb54134a054167f6fcd014bfcf750f789f2f5af98287a52da7c0",
"md5": "1a90e1851efc543b460adb3302755289",
"sha256": "e4a1762db38511e4e4bb83d8931617fff5833e558cbb82940a54918b2e9ceff0"
},
"downloads": -1,
"filename": "nonebot_plugin_ddrace-0.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1a90e1851efc543b460adb3302755289",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>3.9",
"size": 29417,
"upload_time": "2024-10-22T12:59:27",
"upload_time_iso_8601": "2024-10-22T12:59:27.726308Z",
"url": "https://files.pythonhosted.org/packages/c0/8b/08a07055eb54134a054167f6fcd014bfcf750f789f2f5af98287a52da7c0/nonebot_plugin_ddrace-0.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1c54262e7f01c3f1b9565d39c46f89b04f3ac0880ce1e3d958844ceffc985c3a",
"md5": "b6f8ba4760b49407a537ee14317db881",
"sha256": "cc0b89c88404f3e6351e703c18cba515145e4bb50caaeba86268d7229666a329"
},
"downloads": -1,
"filename": "nonebot_plugin_ddrace-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "b6f8ba4760b49407a537ee14317db881",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>3.9",
"size": 24038,
"upload_time": "2024-10-22T12:59:29",
"upload_time_iso_8601": "2024-10-22T12:59:29.586808Z",
"url": "https://files.pythonhosted.org/packages/1c/54/262e7f01c3f1b9565d39c46f89b04f3ac0880ce1e3d958844ceffc985c3a/nonebot_plugin_ddrace-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-22 12:59:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gongfuture",
"github_project": "nonebot-plugin-ddrace",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nonebot-plugin-ddrace"
}