summaryrefslogtreecommitdiff
path: root/ATRI
diff options
context:
space:
mode:
authorKyomotoi <[email protected]>2022-02-03 23:48:59 +0800
committerKyomotoi <[email protected]>2022-02-03 23:48:59 +0800
commit2edcfa381d42e9318cabfb659754b31cc626850d (patch)
tree78e20bd1e8ab95ef2880e2c01f0186b3dde0b96c /ATRI
parent405dfa5a4168f439460cca9322b56919e545bd84 (diff)
downloadATRI-2edcfa381d42e9318cabfb659754b31cc626850d.tar.gz
ATRI-2edcfa381d42e9318cabfb659754b31cc626850d.tar.bz2
ATRI-2edcfa381d42e9318cabfb659754b31cc626850d.zip
🐛♿️ 优化体验
Diffstat (limited to 'ATRI')
-rw-r--r--ATRI/plugins/code_runner/data_source.py7
-rw-r--r--ATRI/plugins/help/__init__.py4
-rw-r--r--ATRI/plugins/help/data_source.py2
3 files changed, 9 insertions, 4 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))
diff --git a/ATRI/plugins/help/__init__.py b/ATRI/plugins/help/__init__.py
index c50d7f2..7008d86 100644
--- a/ATRI/plugins/help/__init__.py
+++ b/ATRI/plugins/help/__init__.py
@@ -37,8 +37,8 @@ service_info = Helper().on_command("帮助", "获取服务详细帮助", aliases
@service_info.handle()
async def _ready_service_info(event: MessageEvent):
msg = str(event.get_message()).split(" ")
-
- service = msg[1]
+
+ service = msg[0]
try:
cmd = msg[2]
except BaseException:
diff --git a/ATRI/plugins/help/data_source.py b/ATRI/plugins/help/data_source.py
index cfa0c62..548924e 100644
--- a/ATRI/plugins/help/data_source.py
+++ b/ATRI/plugins/help/data_source.py
@@ -11,7 +11,7 @@ SERVICE_INFO_FORMAT = """
说明:{docs}
可用命令:\n {cmd_list}
是否全局启用:{enabled}
-Tip: 帮助 [服务] [命令] 以查看对应命令详细信息
+Tip: @bot 帮助 [服务] [命令] 以查看对应命令详细信息
""".strip()