From addb04406444f7844e01b0a129660b0875edfb8b Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Wed, 29 Jun 2022 10:55:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D`=E5=8E=9F=E7=A5=9E=E7=8C=9C?= =?UTF-8?q?=E8=AF=AD=E9=9F=B3`datetime=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Guess_voice/handler.py | 2 +- utils/aiorequests.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Guess_voice/handler.py b/Guess_voice/handler.py index 574a6a7..5c74a43 100644 --- a/Guess_voice/handler.py +++ b/Guess_voice/handler.py @@ -66,7 +66,7 @@ def create_guess_matcher(role_name, second, group_id): re_str = '|'.join(alias_list) guess_matcher = on_regex(re_str, temp=True, rule=Rule(check_group)) guess_matcher.plugin_name = "Guess_voice" - guess_matcher.expire_time = datetime.timedelta(seconds=second) + guess_matcher.expire_time = datetime.datetime.now() + datetime.timedelta(seconds=second) @guess_matcher.handle() async def _(event: GroupMessageEvent): diff --git a/utils/aiorequests.py b/utils/aiorequests.py index 1698d95..9b30e08 100644 --- a/utils/aiorequests.py +++ b/utils/aiorequests.py @@ -1,4 +1,3 @@ -import traceback from io import BytesIO from pathlib import Path from ssl import SSLCertVerificationError