summaryrefslogtreecommitdiff
path: root/ATRI/plugins/code_runner
diff options
context:
space:
mode:
Diffstat (limited to 'ATRI/plugins/code_runner')
-rw-r--r--ATRI/plugins/code_runner/data_source.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ATRI/plugins/code_runner/data_source.py b/ATRI/plugins/code_runner/data_source.py
index febbce6..0d71aff 100644
--- a/ATRI/plugins/code_runner/data_source.py
+++ b/ATRI/plugins/code_runner/data_source.py
@@ -63,10 +63,15 @@ class CodeRunner(Service):
args = msg.split("\n")
if not args:
return "请检查键入内容..."
+
+ try:
+ _ = args[1]
+ except:
+ return "请检查键入内容...需要帮助:/code help"
lang = args[0].replace("\r", "")
if lang not in SUPPORTED_LANGUAGES:
- return "该语言暂不支持..."
+ return "该语言暂不支持...或者可能格式错误?"
del args[0]
code = "\n".join(map(str, args))