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 |
查询队伍信息 |
Metadata
Release files for nonebot-plugin-ret2shell 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_ret2shell-0.1.2.tar.gz | 15.8 kB | Without provenance | Details for nonebot_plugin_ret2shell-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_ret2shell-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_ret2shell-0.1.2-py3-none-any.whl |
Total release size: 33.6 kB
Release files / nonebot_plugin_ret2shell-0.1.2.tar.gz
| Download URL | nonebot_plugin_ret2shell-0.1.2.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c048e7c7ec18a456b532087742e18185a80bdb0d83870b6894781b551bc037a
|
|
BLAKE2b-256 checksum How to use checksums |
bc9efacfe407e64ef39c080851581dc144de439ef29fe15d8490ef77214f1d49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / nonebot_plugin_ret2shell-0.1.2-py3-none-any.whl
| Download URL | nonebot_plugin_ret2shell-0.1.2-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
225ebe8ded308912ac631162d881d9476e4771218608871612f2ebb01e55e612
|
|
BLAKE2b-256 checksum How to use checksums |
da5114dd7f28290ef1c1ed37fd0f81a1cebe1414f15b698b1d67e49c84eeba62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for nonebot-plugin-ret2shell 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.