Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_ret2shell-0.0.9.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_ret2shell-0.0.9-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_ret2shell-0.0.9.tar.gz.

File metadata

  • Download URL: nonebot_plugin_ret2shell-0.0.9.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for nonebot_plugin_ret2shell-0.0.9.tar.gz
Algorithm Hash digest
SHA256 e2735bf9662a52dcf58d0dbd5f278cc70a882ae175b2dee3bd75de6c1c6547f2
MD5 c142ce24bcdfee17d6eac58d490cfdee
BLAKE2b-256 68427cd21b67be6b1b5730216c2c26cb336edd00c3a081c49029e9d9bfa38353

See more details on using hashes here.

File details

Details for the file nonebot_plugin_ret2shell-0.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_ret2shell-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2b823b1c9cae100c0a0004b55fd1361eb9a3731c1307b1530581b826fa408a9c
MD5 c4fa82fc398943144ddbacde8fea496e
BLAKE2b-256 373852185b7cd93c262b9fac0b27d02849123307a0cb613a2e255c68273b68d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page