summaryrefslogtreecommitdiff
path: root/ATRI
diff options
context:
space:
mode:
authorKyomotoi <[email protected]>2023-06-17 00:44:39 +0800
committerKyomotoi <[email protected]>2023-06-17 00:44:39 +0800
commitb82f6128fc828a3066c620919cab557df1efa9a5 (patch)
treef715c54bb8fd08b6700a4a27e71be2b17b8846c0 /ATRI
parentd32566a4880fad6502e24d01fd09d4ca341a32cd (diff)
parent103f3c01d1a3568686a79208c3712b9d82e26c31 (diff)
downloadATRI-b82f6128fc828a3066c620919cab557df1efa9a5.tar.gz
ATRI-b82f6128fc828a3066c620919cab557df1efa9a5.tar.bz2
ATRI-b82f6128fc828a3066c620919cab557df1efa9a5.zip
Merge branch 'main' of https://github.com/Kyomotoi/ATRI
Diffstat (limited to 'ATRI')
-rw-r--r--ATRI/plugins/code_runner/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ATRI/plugins/code_runner/__init__.py b/ATRI/plugins/code_runner/__init__.py
index 95d3b0c..88196e8 100644
--- a/ATRI/plugins/code_runner/__init__.py
+++ b/ATRI/plugins/code_runner/__init__.py
@@ -39,8 +39,8 @@ async def _(event: MessageEvent, opt: str = ArgPlainText("opt")):
await code_runner.finish(CodeRunner().help())
content = MessageSegment.at(user_id) + str(await CodeRunner().runner(unescape(opt)))
- is_save = MessageChecker(str(content)).check_cq_code
- if not is_save:
+ is_safe = MessageChecker(str(content)).check_cq_code
+ if not is_safe:
await code_runner.finish("有潜在的风险, 不予发送")
await code_runner.finish(Message(content))