From 4683145e0ef3f22bbdb15e4c2f8f3ccaf912e7f1 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: Thu, 15 Sep 2022 19:14:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=97=E5=85=B8=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #13 --- QQ.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/QQ.py b/QQ.py index d54d7df..8e8aa0c 100644 --- a/QQ.py +++ b/QQ.py @@ -280,8 +280,8 @@ async def recvMsg(): if str(value.get('FCM')) == "True": data_send(value.get('FCM_API'), id=value.get('KEY'), title="QQ通知", message=str(msg), type='privateMsg') if str(value.get('TG')) == "True": - if str(groupId) in dict(value.get('TG_GroupLink')): - TG_ID = dict(value.get('TG_GroupLink')).get(str(groupId)) + if str(groupId) in eval(value.get('TG_GroupLink')): + TG_ID = eval(value.get('TG_GroupLink')).get(str(groupId)) else: TG_ID = str(value.get('TG_UID')) url = f"{str(value.get('TG_API'))}/bot{str(value.get('KEY'))}/sendMessage" @@ -296,8 +296,8 @@ async def recvMsg(): elif str(value.get('FCM')) == "True": data_send(value.get('FCM_API'), id=value.get('KEY'), title=str(nickname), message=str(msg), type='privateMsg') elif str(value.get('TG')) == "True": - if str(uid) in dict(value.get('TG_GroupLink')): - TG_ID = dict(value.get('TG_GroupLink')).get(str(uid)) + if str(uid) in eval(value.get('TG_GroupLink')): + TG_ID = eval(value.get('TG_GroupLink')).get(str(uid)) else: TG_ID = str(value.get('TG_UID')) msg = nickname + ":\n" + msg @@ -319,8 +319,8 @@ async def recvMsg(): if str(value.get('FCM')) == "True": data_send(value.get('FCM_API'), id='%s' % value.get('KEY'), title=str(groupName), message='%s:%s' % (nickName, msg), type='groupMsg') if str(value.get('TG')) == "True": - if str(groupId) in dict(value.get('TG_GroupLink')): - TG_ID = dict(value.get('TG_GroupLink')).get(str(groupId)) + if str(groupId) in eval(value.get('TG_GroupLink')): + TG_ID = eval(value.get('TG_GroupLink')).get(str(groupId)) else: TG_ID = str(value.get('TG_UID')) text = nickName + "[" + groupName + "]" + ":\n" + msg