Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
白名单判断强制int类型
Browse files Browse the repository at this point in the history
防止后续go-cqhttp上报的群号变为char类型
  • Loading branch information
chase535 authored Sep 12, 2022
1 parent d907a37 commit 9d5945c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions QQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 9d5945c

Please sign in to comment.