Integrate with Ret 2 Shell (回归终端) to forward event messages and query info.
Project description
nonebot-plugin-ret2shell
✨ Ret 2 Shell (回归终端) 赛事事件播报与信息查询 ✨
📖 介绍
对接 Ret 2 Shell (回归终端) 事件推送 WebSocket API、平台 HTTP API 和 生命周期 Webhook 服务,实现赛事事件播报和信息查询功能。
💿 安装
在 NoneBot 机器人项目的根目录下执行插件安装命令:
nb plugin install nonebot-plugin-ret2shell
⚙️ 配置
在 dotenv 配置文件中填入配置:
| 配置项 | 必填 | 说明 |
|---|---|---|
| RET2SHELL_WS_LINK | 是 | 赛事事件推送 WebSocket API 链接 |
| RET2SHELL_ACCOUNT | 否 | 赛事管理员用户名,留空则无法获取部分信息。 |
| RET2SHELL_PASSWORD | 否 | 赛事管理员密码,留空则无法获取部分信息。 |
| WEBHOOK_ROUTE | 否 | Webhook 路由,推荐修改,默认为 /webhook |
| PUBLIC_GROUP_ID | 否 | 比赛群号,留空则不会播报公开事件。 |
| ADMIN_GROUP_ID | 否 | 管理群号,留空则不会播报管理事件。 |
| OPS_ID | 否 | 运维私号,留空则不会播报运维事件。 |
示例:
DRIVER=~fastapi+~websockets
RET2SHELL_WS_LINK=wss://ret.sh.cn/api/event/connect?game_id=1&token=mn7Me1rkMLUbJj-iyHbu0
RET2SHELL_ACCOUNT=_bot
RET2SHELL_PASSWORD=P@sSw0Rd
WEBHOOK_ROUTE=/WeBH00K
PUBLIC_GROUP_ID=123456789
ADMIN_GROUP_ID=987654321
OPS_ID=111222333
如需了解更多,请查看:🔗 Wiki 文档
🎉 使用
安装、配置得当后,启动 NoneBot,通过 OneBot V11 适配器连接 bot,插件即可开始工作。
查询指令表
| 指令 | 说明 |
|---|---|
| /game | 查询赛事信息 |
/rank [tag_name] |
查询单方向排行前十,参数留空则为总分前十。 |
/challenge challenge_id |
查询题目信息 |
/team team_id |
查询队伍信息 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_ret2shell-0.1.0.tar.gz.
File metadata
- Download URL: nonebot_plugin_ret2shell-0.1.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da9f2f5eb0d18514d37561f7671735919df304df9126ba4d0bf2a717052d9014
|
|
| MD5 |
c1056a4dc31d73d42a341497cdc221c3
|
|
| BLAKE2b-256 |
3e64e0669ab2097634bb57800ded0e9ad3a347a5d248e8c9de72aa3678579cfa
|
File details
Details for the file nonebot_plugin_ret2shell-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_ret2shell-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd287fa39903026d6115c303774a4e72b11f41102e0c5cf94ac78f95d5d82a52
|
|
| MD5 |
67799292df7afddc8d4dcec0fcc5ab26
|
|
| BLAKE2b-256 |
1f13fee62b6887abf3906bf412b3a20343610ad28d8bd47b8d1b6a9972589da8
|