From 2edcfa381d42e9318cabfb659754b31cc626850d Mon Sep 17 00:00:00 2001 From: Kyomotoi Date: Thu, 3 Feb 2022 23:48:59 +0800 Subject: =?UTF-8?q?=F0=9F=90=9B=E2=99=BF=EF=B8=8F=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/code_runner/data_source.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ATRI/plugins/code_runner') 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)) -- cgit v1.2.3