nonebot-plugin-nodejsphira
✨ Phira 游戏服务器管理与监控插件 ✨
适用于 NoneBot2 的 Phira Multiplayer (Node.js 版) 后端管理插件。提供实时的房间查询、网页截图监控、服务器协议级连通性检测以及完整的管理员远程控制功能。
📖 功能介绍
- 多维度房间查询:支持纯文本列表展示及高清网页长截图(PC/移动端布局)。
- 连通性检测:模拟 Phira 客户端进行 TCP 协议级握手测试,获取真实延迟。
- 状态监控:一键获取 Phira 服务器各节点的运行状态截图。
- 动态鉴权管理:集成 AES-256-CBC 动态加密算法,安全对接管理接口。
- 全方位行政指令:支持广播、踢人、强制开始、切换锁定、修改人数上限、关闭房间等。
💿 安装方法
推荐使用 nb-cli 进行安装:
nb plugin install nonebot-plugin-nodejsphira
并在机器人 .env 文件中配置必要项。
注意:网页截图功能依赖
nonebot-plugin-htmlrender。安装后请务必执行:playwright install chromium
⚙️ 插件配置项
在机器人的 .env 文件中添加以下配置:
| 配置项 | 类型 | 默认值 | 说明 |
|---|---|---|---|
PHIRA_API_URL |
str | https://phira.chuzoux.top |
Phira WEB服务器基础地址 |
PHIRA_STATUS_PAGE_URL |
str | https://status.dmocken.top/status/phira |
Phira 状态页截图地址 |
PHIRA_CHECK_EMAIL |
str | 无 | Phira 检测账号邮箱 (用于 /status) |
PHIRA_CHECK_PASSWORD |
str | 无 | Phira 检测账号密码 (用于 /status) |
PHIRA_CHECK_SERVER |
str | mp.phira.cn:12346 |
默认检测的 TCP 服务器地址 |
PHIRA_SERVER_NAME |
str | 无 | Phira 服务器名称展示 (用于 /status) |
PHIRA_ADMIN_SECRET |
str | 无 | 必填。需在 phira-mp-nodejsver 项目中设置 |
SUPERUSERS |
list | [] |
机器人管理员列表 (OpenID) |
🎮 触发规则
基础指令 (所有用户)
/room: 获取服务器房间概览列表 (纯文本)。/proom: 以移动端尺寸获取房间列表的网页长截图。/status: 执行 Phira 服务器协议级握手检测 (TCP,返回延迟)。/pstatus: 获取 Phira 服务器节点运行状态图 (截图)。/ping: 查看机器人在线状态及当前用户权限。/help: 显示帮助菜单。
管理指令 (仅 SUPERUSERS)
/players: 列出全服所有活跃玩家。/broadcast "内容" [#ID]: 全服或指定房间广播系统消息。/kick {UID}: 强制踢出指定 ID 的玩家。/fstart {RID},/lock {RID},/maxp {RID} {人数},/close {RID}: 房间行政管理。
🛠️ 其它用法
协议检测原理
/status 指令会模拟登录 phira.5wyxi.com 获取 Token,随后与目标服务器建立 TCP 连接并发送 0x01 握手包。如果收到正确响应,则判定为“在线”并计算往返延迟。
📝 许可证
MIT
Metadata
Release files for nonebot-plugin-nodejsphira 0.1.7
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_nodejsphira-0.1.7.tar.gz | 11.9 kB | Without provenance | Details for nonebot_plugin_nodejsphira-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_nodejsphira-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_nodejsphira-0.1.7-py3-none-any.whl |
Total release size: 28.8 kB
Release files / nonebot_plugin_nodejsphira-0.1.7.tar.gz
| Download URL | nonebot_plugin_nodejsphira-0.1.7.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a2fb93307a641dc696ddfef3b0c02805870d196b06687a5819c54f6ec1425ab
|
|
BLAKE2b-256 checksum How to use checksums |
d8d4bbf7f7960374b1f3c69b159cbbaaf71e28a50d33b8d4a33c90c2f98e0495
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / nonebot_plugin_nodejsphira-0.1.7-py3-none-any.whl
| Download URL | nonebot_plugin_nodejsphira-0.1.7-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebbcfe6b4c33ce9b7d18d695c785f4e9af38dcbd2b8347fc54289931d79bec62
|
|
BLAKE2b-256 checksum How to use checksums |
7ba466925b46d4466b480b9445e98d3f4a01163260ccdbc4cf8634e4ce818c59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for nonebot-plugin-nodejsphira 0.1.7
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.