From 4006dce2581e7d6597958180021974a6de01294e Mon Sep 17 00:00:00 2001 From: Kyomotoi <0w0@imki.moe> Date: Sun, 18 Sep 2022 15:25:50 +0800 Subject: =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20=E6=9B=B4=E6=8D=A2=E6=B6=A9?= =?UTF-8?q?=E5=9B=BE=E6=A3=80=E6=B5=8B=E6=A8=A1=E5=9E=8B=E5=8F=8A=E5=85=B6?= =?UTF-8?q?=20runtime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/setu/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ATRI/plugins/setu/__init__.py') diff --git a/ATRI/plugins/setu/__init__.py b/ATRI/plugins/setu/__init__.py index 71243eb..7962af8 100644 --- a/ATRI/plugins/setu/__init__.py +++ b/ATRI/plugins/setu/__init__.py @@ -99,8 +99,8 @@ async def _setu_catcher(bot: Bot, event: MessageEvent): data = await Setu().detecter(i, _catcher_max_file_size) except Exception: return - if data[1] > 0.7: - hso.append(data[1]) + if data > 0.7: + hso.append(data) hso.sort(reverse=True) @@ -135,8 +135,7 @@ async def _deal_check(bot: Bot, event: MessageEvent): if not args: await nsfw_checker.reject("请发送图片而不是其他东西!!") - data = await Setu().detecter(args[0], _catcher_max_file_size) - hso = data[1] + hso = await Setu().detecter(args[0], _catcher_max_file_size) if not hso: await nsfw_checker.finish("图太小了!不测!") -- cgit v1.2.3