From dedaf0a65f207ce48231a7441aff83ecee79cd0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wuyi=E6=97=A0=E7=96=91?= <444835641@qq.com> Date: Sat, 6 May 2023 09:52:39 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E7=A7=81?= =?UTF-8?q?=E8=81=8A=E6=96=87=E4=BB=B6=E5=BC=82=E5=B8=B8=20(#535)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GenshinUID/__init__.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/GenshinUID/__init__.py b/GenshinUID/__init__.py index 3eff4176..3cddc553 100644 --- a/GenshinUID/__init__.py +++ b/GenshinUID/__init__.py @@ -128,9 +128,14 @@ async def import_gacha_log_info(session: NoticeSession): msg_id = '' pm = 6 - - if priv.check_priv(ev, priv.SUPERUSER): - pm = 1 + + if 'message_type' in ev: + if priv.check_priv(ev, priv.SUPERUSER): + pm = 1 + elif priv.check_priv(ev, priv.OWNER): + pm = 2 + elif priv.check_priv(ev, priv.ADMIN): + pm = 3 user_type = 'group' if group_id else 'direct'