diff options
author | Lint Action <[email protected]> | 2022-02-03 15:32:24 +0000 |
---|---|---|
committer | Lint Action <[email protected]> | 2022-02-03 15:32:24 +0000 |
commit | 5d749651745cbed405fc02875fac6d1c2b397660 (patch) | |
tree | ca758b6fd47d2313c8b906a0160ec79d8716a405 | |
parent | 405dfa5a4168f439460cca9322b56919e545bd84 (diff) | |
download | ATRI-5d749651745cbed405fc02875fac6d1c2b397660.tar.gz ATRI-5d749651745cbed405fc02875fac6d1c2b397660.tar.bz2 ATRI-5d749651745cbed405fc02875fac6d1c2b397660.zip |
:rotating_light: 自动进行代码格式化
-rw-r--r-- | ATRI/plugins/code_runner/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ATRI/plugins/code_runner/__init__.py b/ATRI/plugins/code_runner/__init__.py index 90d4942..26f5c52 100644 --- a/ATRI/plugins/code_runner/__init__.py +++ b/ATRI/plugins/code_runner/__init__.py @@ -16,11 +16,13 @@ code_runner = CodeRunner().on_command("/code", "在线运行一段代码,帮� @code_runner.handle() -async def _code_runner(matcher: Matcher, event: MessageEvent, args: Message = CommandArg()): +async def _code_runner( + matcher: Matcher, event: MessageEvent, args: Message = CommandArg() +): user_id = event.get_user_id() if not _flmt.check(user_id): await code_runner.finish(_flmt_notice) - + msg = args.extract_plain_text() print(msg, args, type(msg), type(args)) if msg: @@ -35,7 +37,6 @@ async def _(event: MessageEvent, opt: str = ArgPlainText("opt")): user_id = event.get_user_id() msg = opt.split("\n") - if msg[0] == "help": content = f"> {MessageSegment.at(user_id)}\n" + "请键入 /code help 以获取帮助~!" elif msg[0] == "list": |