<!-- markdownlint-disable MD026 MD031 MD033 MD036 MD041 MD046 MD051 -->
<div align="center">
<img src="https://raw.githubusercontent.com/Agnes4m/nonebot_plugin_l4d2_server/main/image/logo.png" width="180" height="180" alt="AgnesDigitalLogo">
<br>
<p><img src="https://s2.loli.net/2022/06/16/xsVUGRrkbn1ljTD.png" width="240" alt="NoneBotPluginText"></p>
</div>
<div align="center">
# nonebot_plugin_l4d2_server 1.1.6
_✨Nonebot & Left 4 Dead 2 server 操作 ✨_
<div align = "center">
<a href="https://agnes4m.github.io/l4d2/" target="_blank">文档</a> ·
<a href="https://agnes4m.github.io/l4d2/reader/#%E5%8A%9F%E8%83%BD-%E6%8C%87%E4%BB%A4-%F0%9F%A4%94" target="_blank">指令列表</a> ·
<a href="https://agnes4m.github.io/l4d2/bug/">常见问题</a>
</div><br>
<img src="https://img.shields.io/badge/python-3.9+-blue?logo=python&logoColor=edb641" alt="python">
<a href ="LICENSE">
<img src="https://img.shields.io/github/license/Agnes4m/nonebot_plugin_l4d2_server" alt="l4logo">
</a>
<img src="https://img.shields.io/badge/nonebot-2.1.0+-red.svg" alt="NoneBot">
<a href="https://pypi.python.org/pypi/nonebot_plugin_l4d2_server">
<img src="https://img.shields.io/pypi/v/nonebot_plugin_l4d2_server?logo=python&logoColor=edb641" alt="python">
</a>
</br>
<a href="https://github.com/astral-sh/ruff">
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json" alt="ruff">
</a>
<a href="https://github.com/psf/black">
<img src="https://img.shields.io/badge/code%20style-black-000000.svg?logo=python&logoColor=edb641" alt="black">
</a>
<img src="https://img.shields.io/badge/alconna-0.58.3+-red.svg" alt="NoneBot">
<a href="https://github.com/Agnes4m/nonebot_plugin_l4d2_server/issues">
<img alt="GitHub issues" src="https://img.shields.io/github/issues/Agnes4m/nonebot_plugin_l4d2_server" alt="issues">
</a>
<a href="https://pypi.python.org/pypi/nonebot_plugin_l4d2_server">
<img src="https://img.shields.io/pypi/dm/nonebot_plugin_l4d2_server" alt="pypi download">
</a>
</br>
<a href="https://jq.qq.com/?_wv=1027&k=HdjoCcAe">
<img src="https://img.shields.io/badge/QQ%E7%BE%A4-399365126-orange?style=flat-square" alt="QQ Chat Group">
</a>
</div>
## 指令
- 在 json 文件设置的前缀指令,例如设置"云",则指令 云 输出组服务器,云 1 输出 1 号服务器
- `l4d2帮助` 帮助指令
- l4 图片开启/关闭 超管指令 可以修改输出单图是否为图片输出
- l4 查找用户 在已知服务器中查找
- l4 工坊下载 提供创意工坊 id 下载到服务器和群聊
## 安装
以下提到的方法 任选**其一** 即可
<details open>
<summary>[推荐] 使用 nb-cli 安装</summary>
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
```bash
nb plugin install nonebot-plugin-l4d2-server
```
</details>
<details>
<summary>使用包管理器安装</summary>
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
<details>
<summary>pip</summary>
```bash
pip install nonebot-plugin-l4d2-server
```
</details>
<details>
<summary>pdm</summary>
```bash
pdm add nonebot-plugin-l4d2-server
```
</details>
<details>
<summary>poetry</summary>
```bash
poetry add nonebot-plugin-l4d2-server
```
</details>
<details>
<summary>conda</summary>
```bash
conda install nonebot-plugin-l4d2-server
```
</details>
</details>
## 主要功能
- [x] 求生服务器-本地多路径操作(传地图等)
- [x] 批量查询指定 ip 服务器状态和玩家
- [x] connect 指令直接呼出服务器信息
- [x] 根据用户名,在已知服务器搜索玩家信息
## [数据结构](./docs/standand.md)
暂未更新
## env 设置
```bash
l4_enable = True
"""是否全局启用求生功能"""
l4_image = False
"""是否启用图片"""
l4_connect = True
"""是否在查服命令后加入connect ip"""
l4_path = "data/L4D2"
"""插件数据路径"""
l4_players = 4
"""查询总图的时候展示的用户数量"""
l4_style = "default"
"""图片风格,可选包括以下
- 简洁
```
## 和 0.x.x 更改部分
- 取消了网页控制台(没有卵用)
- 取消了自动重启(与其他插件功能重复)
- 取消了 git 拉取更新(nb 规范用 pypi)
- 删除无用部分(依赖太多难以维护)
- 删除了 anne 部分,已移植到[这里](https://github.com/Agnes4m/L4D2UID),通过 core 插件调用
## 其他
- 本人技术很差,如果您有发现 BUG 或者更好的建议,欢迎提 Issue & Pr
- 如果本插件对你有帮助,不要忘了点个 Star~
- 本项目仅供学习使用,请勿用于商业用途
- [更新日志](./docs/update.md)
- [GPL-3.0 License](https://github.com/Agnes4m/nonebot_plugin_l4d2_server/blob/main/LICENSE) ©[@Agnes4m](https://github.com/Agnes4m)
## 🌐 感谢
- [nonebot2](https://github.com/nonebot/nonebot2)- 聊天机器人的基础框架
- [饼干](https://github.com/lgc2333) - 指导 nonebot2 框架的函数使用
- [wuyi](https://github.com/KimigaiiWuyi/) - 指导 pil 作图
- 感谢以下服主大力支持
- Michaela's | 机器人功能测试反馈
- 东 | 提供 docker 部署方法等建议 | [电信服 anne 游戏群](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=6i7r5aJ7Jyg0ejby4rt9GWmFRF53nV1K&authKey=ekMsWepBZPL26%2BfJAG%2F95JD0fhvH39%2BIGVyKOvNlXVDbpIclJlly4kXqukL7JhWR&noverify=0&group_code=883237206)
- 迷茫 | 催命更新 byd
- ArcPav | 积极反馈 bug,提供改进思路
Raw data
{
"_id": null,
"home_page": null,
"name": "nonebot-plugin-l4d2-server",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "steam, game, l4d2, nonebot2, plugin",
"author": null,
"author_email": "Agnes_Digital <Z735803792@163.com>",
"download_url": "https://files.pythonhosted.org/packages/ef/db/1f350719c1971bfc5e5d8a495010b92bf769dffe6d9eeabcca071c8f7106/nonebot_plugin_l4d2_server-1.1.6.tar.gz",
"platform": null,
"description": "<!-- markdownlint-disable MD026 MD031 MD033 MD036 MD041 MD046 MD051 -->\n<div align=\"center\">\n <img src=\"https://raw.githubusercontent.com/Agnes4m/nonebot_plugin_l4d2_server/main/image/logo.png\" width=\"180\" height=\"180\" alt=\"AgnesDigitalLogo\">\n <br>\n <p><img src=\"https://s2.loli.net/2022/06/16/xsVUGRrkbn1ljTD.png\" width=\"240\" alt=\"NoneBotPluginText\"></p>\n</div>\n\n<div align=\"center\">\n\n# nonebot_plugin_l4d2_server 1.1.6\n\n_\u2728Nonebot & Left 4 Dead 2 server \u64cd\u4f5c \u2728_\n\n<div align = \"center\">\n <a href=\"https://agnes4m.github.io/l4d2/\" target=\"_blank\">\u6587\u6863</a> \u00b7 \n <a href=\"https://agnes4m.github.io/l4d2/reader/#%E5%8A%9F%E8%83%BD-%E6%8C%87%E4%BB%A4-%F0%9F%A4%94\" target=\"_blank\">\u6307\u4ee4\u5217\u8868</a> \u00b7 \n <a href=\"https://agnes4m.github.io/l4d2/bug/\">\u5e38\u89c1\u95ee\u9898</a>\n</div><br>\n\n<img src=\"https://img.shields.io/badge/python-3.9+-blue?logo=python&logoColor=edb641\" alt=\"python\">\n<a href =\"LICENSE\">\n<img src=\"https://img.shields.io/github/license/Agnes4m/nonebot_plugin_l4d2_server\" alt=\"l4logo\">\n</a>\n<img src=\"https://img.shields.io/badge/nonebot-2.1.0+-red.svg\" alt=\"NoneBot\">\n<a href=\"https://pypi.python.org/pypi/nonebot_plugin_l4d2_server\">\n<img src=\"https://img.shields.io/pypi/v/nonebot_plugin_l4d2_server?logo=python&logoColor=edb641\" alt=\"python\">\n</a>\n</br>\n<a href=\"https://github.com/astral-sh/ruff\">\n<img src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json\" alt=\"ruff\">\n</a>\n<a href=\"https://github.com/psf/black\">\n<img src=\"https://img.shields.io/badge/code%20style-black-000000.svg?logo=python&logoColor=edb641\" alt=\"black\">\n</a>\n\n<img src=\"https://img.shields.io/badge/alconna-0.58.3+-red.svg\" alt=\"NoneBot\">\n\n<a href=\"https://github.com/Agnes4m/nonebot_plugin_l4d2_server/issues\">\n <img alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/Agnes4m/nonebot_plugin_l4d2_server\" alt=\"issues\">\n</a>\n\n<a href=\"https://pypi.python.org/pypi/nonebot_plugin_l4d2_server\">\n <img src=\"https://img.shields.io/pypi/dm/nonebot_plugin_l4d2_server\" alt=\"pypi download\">\n</a>\n</br>\n<a href=\"https://jq.qq.com/?_wv=1027&k=HdjoCcAe\">\n <img src=\"https://img.shields.io/badge/QQ%E7%BE%A4-399365126-orange?style=flat-square\" alt=\"QQ Chat Group\">\n</a>\n</div>\n\n## \u6307\u4ee4\n\n- \u5728 json \u6587\u4ef6\u8bbe\u7f6e\u7684\u524d\u7f00\u6307\u4ee4\uff0c\u4f8b\u5982\u8bbe\u7f6e\"\u4e91\"\uff0c\u5219\u6307\u4ee4 \u4e91 \u8f93\u51fa\u7ec4\u670d\u52a1\u5668\uff0c\u4e91 1 \u8f93\u51fa 1 \u53f7\u670d\u52a1\u5668\n- `l4d2\u5e2e\u52a9` \u5e2e\u52a9\u6307\u4ee4\n- l4 \u56fe\u7247\u5f00\u542f/\u5173\u95ed \u8d85\u7ba1\u6307\u4ee4 \u53ef\u4ee5\u4fee\u6539\u8f93\u51fa\u5355\u56fe\u662f\u5426\u4e3a\u56fe\u7247\u8f93\u51fa\n- l4 \u67e5\u627e\u7528\u6237 \u5728\u5df2\u77e5\u670d\u52a1\u5668\u4e2d\u67e5\u627e\n- l4 \u5de5\u574a\u4e0b\u8f7d \u63d0\u4f9b\u521b\u610f\u5de5\u574a id \u4e0b\u8f7d\u5230\u670d\u52a1\u5668\u548c\u7fa4\u804a\n\n## \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 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```bash\nnb plugin install nonebot-plugin-l4d2-server\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<details>\n<summary>pip</summary>\n\n```bash\npip install nonebot-plugin-l4d2-server\n```\n\n</details>\n<details>\n<summary>pdm</summary>\n\n```bash\npdm add nonebot-plugin-l4d2-server\n```\n\n</details>\n<details>\n<summary>poetry</summary>\n\n```bash\npoetry add nonebot-plugin-l4d2-server\n```\n\n</details>\n<details>\n<summary>conda</summary>\n\n```bash\nconda install nonebot-plugin-l4d2-server\n```\n\n</details>\n</details>\n\n## \u4e3b\u8981\u529f\u80fd\n\n- [x] \u6c42\u751f\u670d\u52a1\u5668-\u672c\u5730\u591a\u8def\u5f84\u64cd\u4f5c\uff08\u4f20\u5730\u56fe\u7b49\uff09\n- [x] \u6279\u91cf\u67e5\u8be2\u6307\u5b9a ip \u670d\u52a1\u5668\u72b6\u6001\u548c\u73a9\u5bb6\n- [x] connect \u6307\u4ee4\u76f4\u63a5\u547c\u51fa\u670d\u52a1\u5668\u4fe1\u606f\n- [x] \u6839\u636e\u7528\u6237\u540d\uff0c\u5728\u5df2\u77e5\u670d\u52a1\u5668\u641c\u7d22\u73a9\u5bb6\u4fe1\u606f\n\n## [\u6570\u636e\u7ed3\u6784](./docs/standand.md)\n\n\u6682\u672a\u66f4\u65b0\n\n## env \u8bbe\u7f6e\n\n```bash\n l4_enable = True\n \"\"\"\u662f\u5426\u5168\u5c40\u542f\u7528\u6c42\u751f\u529f\u80fd\"\"\"\n l4_image = False\n \"\"\"\u662f\u5426\u542f\u7528\u56fe\u7247\"\"\"\n l4_connect = True\n \"\"\"\u662f\u5426\u5728\u67e5\u670d\u547d\u4ee4\u540e\u52a0\u5165connect ip\"\"\"\n l4_path = \"data/L4D2\"\n \"\"\"\u63d2\u4ef6\u6570\u636e\u8def\u5f84\"\"\"\n l4_players = 4\n \"\"\"\u67e5\u8be2\u603b\u56fe\u7684\u65f6\u5019\u5c55\u793a\u7684\u7528\u6237\u6570\u91cf\"\"\"\n l4_style = \"default\"\n \"\"\"\u56fe\u7247\u98ce\u683c\uff0c\u53ef\u9009\u5305\u62ec\u4ee5\u4e0b\n - \u7b80\u6d01\n```\n\n## \u548c 0.x.x \u66f4\u6539\u90e8\u5206\n\n- \u53d6\u6d88\u4e86\u7f51\u9875\u63a7\u5236\u53f0(\u6ca1\u6709\u5375\u7528)\n- \u53d6\u6d88\u4e86\u81ea\u52a8\u91cd\u542f(\u4e0e\u5176\u4ed6\u63d2\u4ef6\u529f\u80fd\u91cd\u590d)\n- \u53d6\u6d88\u4e86 git \u62c9\u53d6\u66f4\u65b0(nb \u89c4\u8303\u7528 pypi)\n- \u5220\u9664\u65e0\u7528\u90e8\u5206(\u4f9d\u8d56\u592a\u591a\u96be\u4ee5\u7ef4\u62a4)\n- \u5220\u9664\u4e86 anne \u90e8\u5206\uff0c\u5df2\u79fb\u690d\u5230[\u8fd9\u91cc](https://github.com/Agnes4m/L4D2UID),\u901a\u8fc7 core \u63d2\u4ef6\u8c03\u7528\n\n## \u5176\u4ed6\n\n- \u672c\u4eba\u6280\u672f\u5f88\u5dee\uff0c\u5982\u679c\u60a8\u6709\u53d1\u73b0 BUG \u6216\u8005\u66f4\u597d\u7684\u5efa\u8bae\uff0c\u6b22\u8fce\u63d0 Issue & Pr\n- \u5982\u679c\u672c\u63d2\u4ef6\u5bf9\u4f60\u6709\u5e2e\u52a9\uff0c\u4e0d\u8981\u5fd8\u4e86\u70b9\u4e2a Star~\n- \u672c\u9879\u76ee\u4ec5\u4f9b\u5b66\u4e60\u4f7f\u7528\uff0c\u8bf7\u52ff\u7528\u4e8e\u5546\u4e1a\u7528\u9014\n- [\u66f4\u65b0\u65e5\u5fd7](./docs/update.md)\n- [GPL-3.0 License](https://github.com/Agnes4m/nonebot_plugin_l4d2_server/blob/main/LICENSE) \u00a9[@Agnes4m](https://github.com/Agnes4m)\n\n## \ud83c\udf10 \u611f\u8c22\n\n- [nonebot2](https://github.com/nonebot/nonebot2)- \u804a\u5929\u673a\u5668\u4eba\u7684\u57fa\u7840\u6846\u67b6\n- [\u997c\u5e72](https://github.com/lgc2333) - \u6307\u5bfc nonebot2 \u6846\u67b6\u7684\u51fd\u6570\u4f7f\u7528\n- [wuyi](https://github.com/KimigaiiWuyi/) - \u6307\u5bfc pil \u4f5c\u56fe\n\n- \u611f\u8c22\u4ee5\u4e0b\u670d\u4e3b\u5927\u529b\u652f\u6301\n - Michaela's | \u673a\u5668\u4eba\u529f\u80fd\u6d4b\u8bd5\u53cd\u9988\n - \u4e1c | \u63d0\u4f9b docker \u90e8\u7f72\u65b9\u6cd5\u7b49\u5efa\u8bae | [\u7535\u4fe1\u670d anne \u6e38\u620f\u7fa4](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=6i7r5aJ7Jyg0ejby4rt9GWmFRF53nV1K&authKey=ekMsWepBZPL26%2BfJAG%2F95JD0fhvH39%2BIGVyKOvNlXVDbpIclJlly4kXqukL7JhWR&noverify=0&group_code=883237206)\n - \u8ff7\u832b | \u50ac\u547d\u66f4\u65b0 byd\n - ArcPav | \u79ef\u6781\u53cd\u9988 bug\uff0c\u63d0\u4f9b\u6539\u8fdb\u601d\u8def\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "L4D2 server related operations plugin for NoneBot2",
"version": "1.1.6",
"project_urls": {
"homepage": "https://github.com/Agnes4m/nonebot_plugin_l4d2_server"
},
"split_keywords": [
"steam",
" game",
" l4d2",
" nonebot2",
" plugin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9788331cae4a4fc36e22ca0724d84b61ad516e38ae3f32b0f2e940b6498ae991",
"md5": "e5075e14a6b67ea88b8096df6dcfb36a",
"sha256": "759bed1012e631a508f091092d0b7cd08f404705e5dbe84b4a89efa5720732e0"
},
"downloads": -1,
"filename": "nonebot_plugin_l4d2_server-1.1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e5075e14a6b67ea88b8096df6dcfb36a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 9868789,
"upload_time": "2025-07-14T09:41:44",
"upload_time_iso_8601": "2025-07-14T09:41:44.541161Z",
"url": "https://files.pythonhosted.org/packages/97/88/331cae4a4fc36e22ca0724d84b61ad516e38ae3f32b0f2e940b6498ae991/nonebot_plugin_l4d2_server-1.1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "efdb1f350719c1971bfc5e5d8a495010b92bf769dffe6d9eeabcca071c8f7106",
"md5": "6df6f99feda034752dde4af503559b7e",
"sha256": "7744e0cea2ba598846ca3572786f60186710057ae935d4e7fd409ff327653210"
},
"downloads": -1,
"filename": "nonebot_plugin_l4d2_server-1.1.6.tar.gz",
"has_sig": false,
"md5_digest": "6df6f99feda034752dde4af503559b7e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 9779120,
"upload_time": "2025-07-14T09:41:46",
"upload_time_iso_8601": "2025-07-14T09:41:46.784981Z",
"url": "https://files.pythonhosted.org/packages/ef/db/1f350719c1971bfc5e5d8a495010b92bf769dffe6d9eeabcca071c8f7106/nonebot_plugin_l4d2_server-1.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-14 09:41:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Agnes4m",
"github_project": "nonebot_plugin_l4d2_server",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "nonebot-plugin-l4d2-server"
}