From eb1053dc897569bc8e29ff52cd954f04fc2bb40e Mon Sep 17 00:00:00 2001 From: SiHuan Date: Mon, 3 Aug 2020 22:10:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=81=E6=9D=A5=E8=B0=81=E5=85=88=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- route.py | 6 ++++++ zzcore.py | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/route.py b/route.py index 54fb6de..8198a59 100644 --- a/route.py +++ b/route.py @@ -1,7 +1,13 @@ from worker import emmm +from zzcore import DM def ZZRouter(data): + + if '[CQ:image,file=a854b2390d427b02fc26cae49d508a75.image]' in data['raw_message'] and data['user_id'] != 1318000868: + DM(data['message_id']) + + if data['post_type'] != 'message' or data['message_type'] != 'group' or data['message'][0] != '/': return diff --git a/zzcore.py b/zzcore.py index bed2c5c..3c86f72 100644 --- a/zzcore.py +++ b/zzcore.py @@ -77,4 +77,13 @@ def mysakuya(self, words): if sakuya in words: return False - return True \ No newline at end of file + return True + + +def DM(msgid): + url = APIURL + "delete_msg" + data = { + 'access_token' : AUTHORIZATION, + 'message_id' : msgid, + } + requests.get(url = url, params=data) \ No newline at end of file