From be2747e4d4b820ca0f1f988d3b77a628da26fe7b Mon Sep 17 00:00:00 2001 From: Kyomotoi Date: Thu, 8 Jul 2021 22:09:00 +0800 Subject: =?UTF-8?q?=F0=9F=94=96=E2=99=BB=EF=B8=8F=F0=9F=90=9B=F0=9F=94=A7?= =?UTF-8?q?=F0=9F=94=A5=F0=9F=93=9D=20=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=EF=BC=9AYHN-001-A03?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🔖 更新版本至:YHN-001-A03 ✨ 新增插件: - 涩图 - 闲聊(文爱 ♻️ 重构: - Service - 所有插件 🐛 修复部分小bug 🔧 暂时移除部分设置 🔥 删除: - 插件:nsfw、wife。日后加回 - 插件 essential 中部分内容 📝 更新README --- ATRI/utils/cqcode.py | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 ATRI/utils/cqcode.py (limited to 'ATRI/utils/cqcode.py') diff --git a/ATRI/utils/cqcode.py b/ATRI/utils/cqcode.py deleted file mode 100644 index e4c6b5e..0000000 --- a/ATRI/utils/cqcode.py +++ /dev/null @@ -1,27 +0,0 @@ -import re -from typing import Optional - -from ATRI.service import Service as sv - - -tencent_gchat_url = "gchat.qpic.cn" -noob_code = ["record", "video", "music", "xml", "json"] - - -async def coolq_code_check( - cq_code: str, user: Optional[int] = None, group: Optional[int] = None -): - _type = re.findall(r"CQ:(.*?),", cq_code) - for i in _type: - if i == "image": - result = re.findall(r"url=(.*?)]", cq_code) - url = "" if not result else result[0] - if tencent_gchat_url not in url: - msg = "你注你🐎呢" - await sv.NetworkPost.send_msg(user_id=user, group_id=group, message=msg) - else: - return True - elif i in noob_code: - return False - else: - return True -- cgit v1.2.3