summaryrefslogtreecommitdiff
path: root/ATRI/utils/cqcode.py
diff options
context:
space:
mode:
authorLint Action <[email protected]>2021-05-04 06:29:07 +0000
committerLint Action <[email protected]>2021-05-04 06:29:07 +0000
commit8804f1e10d507ba293fafc77a7e93d3a84a5814b (patch)
treee107da61f76dfe64dfb96feb5e961bbc4bbd8d52 /ATRI/utils/cqcode.py
parentea7f48011c34fdaec7e91af7eb373c8174e439e6 (diff)
downloadATRI-8804f1e10d507ba293fafc77a7e93d3a84a5814b.tar.gz
ATRI-8804f1e10d507ba293fafc77a7e93d3a84a5814b.tar.bz2
ATRI-8804f1e10d507ba293fafc77a7e93d3a84a5814b.zip
:rotating_light: 自动进行代码格式化
Diffstat (limited to 'ATRI/utils/cqcode.py')
-rw-r--r--ATRI/utils/cqcode.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/ATRI/utils/cqcode.py b/ATRI/utils/cqcode.py
index 3102a92..e4c6b5e 100644
--- a/ATRI/utils/cqcode.py
+++ b/ATRI/utils/cqcode.py
@@ -8,9 +8,9 @@ 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):
+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":
@@ -18,12 +18,10 @@ async def coolq_code_check(cq_code: str,
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)
+ 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 \ No newline at end of file
+ return True