Skip to main content

Subscribe to Ret 2 Shell (回归终端) event API and forward messages, also support information inquiry.

Project description

nonebot-plugin-ret2shell

✨ Ret 2 Shell (回归终端) 比赛事件播报与信息查询 ✨

📖 介绍

接入 Ret 2 Shell (回归终端) 事件推送 API,根据比赛发生的事件类型,实时向指定的群组或管理员账号播报,还具有主动查询功能。

💿 安装

在 NoneBot 机器人项目的根目录下执行插件安装命令:

nb plugin install nonebot-plugin-ret2shell

⚙️ 配置

在 dotenv 配置文件中填入配置:

配置项 必填 说明
RET2SHELL_WS_LINK 平台事件推送 API 链接
TARGET_GROUP_ID 比赛群号,留空则不会播报公开事件。
ADMIN_ID 管理员号,留空则不会播报管理事件。
CLIENT_LABEL 客户端标识,可在 已连接的设备 中查看。
默认为 nonebot-plugin-ret2shell

示例:

DRIVER=~fastapi+~websockets

RET2SHELL_WS_LINK=ws://ret.sh.cn/api/event/connect?game_id=1&token=mn7Me1rkMLUbJj-iyHbu0
TARGET_GROUP_ID=123456789
ADMIN_ID=987654321

🎉 使用

通过 OneBot 适配器连接机器人后,插件会尝试与平台事件推送 API 建立连接,然后播报事件。当机器人连接断开后,插件也会与平台断开连接,以节省资源。

查询指令表:

指令 说明
/game 查询比赛基础信息
/rank 查询比赛积分板

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.5.tar.gz (11.3 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.5-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_ret2shell-0.0.5.tar.gz
  • Upload date:
  • Size: 11.3 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.5.tar.gz
Algorithm Hash digest
SHA256 29c7ff4d7cbf77c9154cef5712041e1e1c36e8f48d39e0f144f5df3a9e323ba9
MD5 ebac39ab4f288894a47649c06b1ff63d
BLAKE2b-256 eb12cd77878c74d10766316c32be976d3cd2c5516028261c90ef325522e74476

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_ret2shell-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 665f92e873539c025869deb141553fe7b47403e5bd962ac5b9fcb3e158fa0396
MD5 84cf79afb311febdb18f72032aa45635
BLAKE2b-256 0d183e1ea0d87ad2df7023a2aff7cb2f781275489f8233c239b64e2e8036076a

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