From 9d5945ce55ead6fcab6b8feaff25191a7b763d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AF=BA=E9=B8=A1=E9=B8=AD?= <107602367+chase535@users.noreply.github.com> Date: Mon, 12 Sep 2022 23:45:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BD=E5=90=8D=E5=8D=95=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=BC=BA=E5=88=B6int=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 防止后续go-cqhttp上报的群号变为char类型 --- QQ.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/QQ.py b/QQ.py index 0ae30bb..d54d7df 100644 --- a/QQ.py +++ b/QQ.py @@ -263,7 +263,7 @@ async def recvMsg(): elif json_data.get("post_type") == "notice": if json_data.get("notice_type") == "group_upload": groupId = json_data.get("group_id") - if groupId in list(value.get('WhiteList')): + if int(groupId) in list(value.get('WhiteList')): groupName = getGroupName(groupId) filename = json_data.get("file").get("name") userid = json_data.get("user_id") @@ -305,7 +305,7 @@ async def recvMsg(): data_send(str(url), chat_id=str(TG_ID), text=str(msg), disable_web_page_preview="true") elif json_data.get("message_type") == "group": groupId = json_data.get("group_id") - if groupId in list(value.get('WhiteList')): + if int(groupId) in list(value.get('WhiteList')): uid = json_data.get("sender").get("user_id") nickName = json_data.get("sender").get("nickname") card = json_data.get("sender").get("card")