nonebot-plugin-maimaimonitor 26.2.2__tar.gz → 26.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/PKG-INFO +1 -1
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/README.md +2 -3
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/nonebot_plugin_maimaimonitor/maimai_plugin_v11.py +9 -15
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/nonebot_plugin_maimaimonitor.egg-info/PKG-INFO +1 -1
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/pyproject.toml +1 -1
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/LICENSE +0 -0
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/nonebot_plugin_maimaimonitor/__init__.py +0 -0
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/nonebot_plugin_maimaimonitor/client.py +0 -0
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/nonebot_plugin_maimaimonitor/config.py +0 -0
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/nonebot_plugin_maimaimonitor/constants.py +0 -0
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/nonebot_plugin_maimaimonitor.egg-info/SOURCES.txt +0 -0
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/nonebot_plugin_maimaimonitor.egg-info/dependency_links.txt +0 -0
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/nonebot_plugin_maimaimonitor.egg-info/requires.txt +0 -0
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/nonebot_plugin_maimaimonitor.egg-info/top_level.txt +0 -0
- {nonebot_plugin_maimaimonitor-26.2.2 → nonebot_plugin_maimaimonitor-26.2.3}/setup.cfg +0 -0
|
@@ -48,7 +48,7 @@ pip install nonebot-plugin-maimaimonitor
|
|
|
48
48
|
| `MAIMAI_BROADCAST_INTERVAL` | `int` | `300` | 广播轮询检测间隔(秒)|
|
|
49
49
|
| `MAIMAI_BROADCAST_ALL_GROUPS` | `bool` | `false` | 向bot所在所有群播报,谨慎使用 |
|
|
50
50
|
| `MAIMAI_BROADCAST_TIME_RANGES` | `str` | 无 | 推送时间白名单,格式如 `8-11,13-20`,空时不限制。左闭右开(`8-11` 包含 8 点不包含 11 点),跨天用 `22-6`(晚上 10 点到早上 6 点)|
|
|
51
|
-
| `MAIMAI_BROADCAST_SERVERS` | `list[str]` | `[]` | 要播报的服务器列表,可填 key 或名字(如 `["net","aime"]
|
|
51
|
+
| `MAIMAI_BROADCAST_SERVERS` | `list[str]` | `[]` | 要播报的服务器列表,可填 key 或名字(如 `["net","aime"]`)。留空默认全部服务(NET/会员/标题/公众号)都播报宕机提示 |
|
|
52
52
|
|
|
53
53
|
> **申请 Client ID**:Client ID 由您自行提供,任意 ASCII 字符串,联系 qwq@chongxi.us 或 chongxi3555@proton.me 获取对应私钥。
|
|
54
54
|
|
|
@@ -66,7 +66,6 @@ pip install nonebot-plugin-maimaimonitor
|
|
|
66
66
|
🟢 会员 38ms
|
|
67
67
|
🟢 标题 45ms
|
|
68
68
|
🟢 公众号 51ms
|
|
69
|
-
🟢 配信 40ms
|
|
70
69
|
|
|
71
70
|
⏱ 当前延迟:42ms|服务器负载:流畅|延迟稳定
|
|
72
71
|
💬 服务器运行正常
|
|
@@ -101,7 +100,7 @@ pip install nonebot-plugin-maimaimonitor
|
|
|
101
100
|
- 返航(正常):「华立冯返航了」「SEGA老冯落地」
|
|
102
101
|
|
|
103
102
|
### 断网播报 (无需私钥)
|
|
104
|
-
配置 `MAIMAI_BROADCAST_GROUP_IDS` 或开启 `MAIMAI_BROADCAST_ALL_GROUPS`
|
|
103
|
+
配置 `MAIMAI_BROADCAST_GROUP_IDS` 或开启 `MAIMAI_BROADCAST_ALL_GROUPS` 后,服务器宕机时自动推送(默认全部服务的宕机都会播报,可用 `MAIMAI_BROADCAST_SERVERS` 限定播报范围):
|
|
105
104
|
|
|
106
105
|
```
|
|
107
106
|
【舞萌DX服务器断网播报】
|
|
@@ -59,23 +59,17 @@ def _resolve_verdict(data: dict) -> str:
|
|
|
59
59
|
return LEGACY_STATUS_TO_VERDICT.get(data.get("status", "normal"), "normal")
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
def _is_delivery(s: dict) -> bool:
|
|
63
|
-
key = str(s.get("key", "")).lower()
|
|
64
|
-
name = str(s.get("name", "")).lower()
|
|
65
|
-
return key == "haisin" or (not key and name == "配信")
|
|
66
|
-
|
|
67
|
-
|
|
68
62
|
def _broadcast_eligible(services) -> list[dict]:
|
|
69
63
|
cfg = {str(x).lower() for x in config.maimai_broadcast_servers}
|
|
70
|
-
if cfg:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return
|
|
64
|
+
if not cfg:
|
|
65
|
+
return list(services or [])
|
|
66
|
+
out = []
|
|
67
|
+
for s in services or []:
|
|
68
|
+
candidates = {str(s.get("key", "")).lower(), str(s.get("name", "")).lower()}
|
|
69
|
+
candidates.discard("")
|
|
70
|
+
if candidates & cfg:
|
|
71
|
+
out.append(s)
|
|
72
|
+
return out
|
|
79
73
|
|
|
80
74
|
|
|
81
75
|
def _render_services(services) -> list[str]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|