监控 NapCat 登录状态,方便在tx每日打击 Bot 掉线后自动尝试恢复,并通过另一个 Bot 向已订阅会话发送登录二维码。建议使用 Telegram 或 Discord Bot 接收通知。
安装
nb plugin install nonebot-plugin-ncqrcode
或:
uv add nonebot-plugin-ncqrcode
配置
# NapCat WebUI 的访问地址
NCQRCODE_BASE_URL=http://127.0.0.1:6099
# NapCat WebUI 的访问密钥
NCQRCODE_TOKEN=Napcat WebUI 密钥
# 需要监控和恢复登录的 QQ 号
NCQRCODE_ACCOUNT_ID=被监控的 QQ 号
# 每次掉线最多向订阅目标发送二维码的次数,默认为 5
NCQRCODE_MAX_QR_NOTIFICATIONS=5
使用
仅限 SUPERUSER 使用:
| 命令 | 说明 |
|---|---|
/nc subscribe |
将当前场景设为通知目标 |
/nc unsubscribe |
清除通知目标 |
/nc qrcode |
获取登录二维码,仅回复当前会话 |
效果图
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_ncqrcode-0.2.0.tar.gz.
File metadata
- Download URL: nonebot_plugin_ncqrcode-0.2.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06e25187366964f186458946161b73de2f7fb5d95a101f5db6800ddfe1d4a319
|
|
| MD5 |
ff5169059f739b77f5758bd787a16206
|
|
| BLAKE2b-256 |
b3a2b5caf9f0a726177f5897ec10f3645c1a568c75a6725011da55723ca7c6cf
|
File details
Details for the file nonebot_plugin_ncqrcode-0.2.0-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_ncqrcode-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9c124dfa77d90f984944601b1ed05c835e69101316614690d482e5873092705
|
|
| MD5 |
5b198073aa7cfaedb4dfd618dcef52af
|
|
| BLAKE2b-256 |
1fcb8874f9e8c83d5d71f7420d3d057fe0772c89f9b1e108370e5add4f55d7dc
|