diff options
author | Kyomotoi <[email protected]> | 2022-10-14 10:28:20 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2022-10-14 10:28:20 +0800 |
commit | 7b34c739600c4fd7f5d1936effcf9cfecf6ea008 (patch) | |
tree | 9f0e66b1d35448aae84ecbc97c11a83c5bd08f2a | |
parent | 4455fdca645978d68188cb1e087d076ef4436ce9 (diff) | |
download | ATRI-7b34c739600c4fd7f5d1936effcf9cfecf6ea008.tar.gz ATRI-7b34c739600c4fd7f5d1936effcf9cfecf6ea008.tar.bz2 ATRI-7b34c739600c4fd7f5d1936effcf9cfecf6ea008.zip |
🚑️ 兼容性改动
-rw-r--r-- | ATRI/plugins/console/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ATRI/plugins/console/__init__.py b/ATRI/plugins/console/__init__.py index c6f37c6..1a05789 100644 --- a/ATRI/plugins/console/__init__.py +++ b/ATRI/plugins/console/__init__.py @@ -43,7 +43,7 @@ async def _(event: PrivateMessageEvent, is_pub_n: str = ArgPlainText("is_pub_n") else: now_time = datetime.now().timestamp() data = json.loads(__AUTH_FILE_PATH.read_bytes())["data"] - if now_time < data["dead_time"]: + if now_time < data["dead_time"] and data.get("dead_time"): raw_last_time = data["dead_time"] - now_time last_time = datetime.fromtimestamp(raw_last_time).minute await gen_console_key.finish( |