diff options
author | Kyomotoi <[email protected]> | 2022-12-30 14:31:44 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2022-12-30 14:31:44 +0800 |
commit | 9dfe4e006adbfe061ccb5c87915d750c550c34a0 (patch) | |
tree | 05baa6b09b279a0331481554f23cb62dbab5b56f /ATRI | |
parent | fcb66acce2b73728ab228f0fc54a6315bc14c293 (diff) | |
download | ATRI-9dfe4e006adbfe061ccb5c87915d750c550c34a0.tar.gz ATRI-9dfe4e006adbfe061ccb5c87915d750c550c34a0.tar.bz2 ATRI-9dfe4e006adbfe061ccb5c87915d750c550c34a0.zip |
⚡️ 添加次数限制提醒
Diffstat (limited to 'ATRI')
-rw-r--r-- | ATRI/plugins/status.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ATRI/plugins/status.py b/ATRI/plugins/status.py index d6a5682..dbf95dc 100644 --- a/ATRI/plugins/status.py +++ b/ATRI/plugins/status.py @@ -51,11 +51,13 @@ async def _(): except Exception: bot = None if not limiter.check("114514"): - try: - if bot: await plugin.send_to_master(msg) - limiter.increase("114514") - except Exception: - return + msg = "状态检查提示已达限制, 将冷却 6h" + + try: + if bot: await plugin.send_to_master(msg) + limiter.increase("114514") + except Exception: + return else: log.info("资源消耗正常") |