diff options
author | Kyomotoi <[email protected]> | 2022-02-03 20:03:49 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2022-02-03 20:03:49 +0800 |
commit | 79280a401fa0461868d06909643aa9aad2733b2d (patch) | |
tree | d1a798ddac73d5a12bf14a1877268f20af7d92db /ATRI/plugins/manage | |
parent | b3055632c56927aea42f1d7a84c1206d0e1f4bbd (diff) | |
download | ATRI-79280a401fa0461868d06909643aa9aad2733b2d.tar.gz ATRI-79280a401fa0461868d06909643aa9aad2733b2d.tar.bz2 ATRI-79280a401fa0461868d06909643aa9aad2733b2d.zip |
🚑️ 进行一个bug的修
Diffstat (limited to 'ATRI/plugins/manage')
-rw-r--r-- | ATRI/plugins/manage/__init__.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ATRI/plugins/manage/__init__.py b/ATRI/plugins/manage/__init__.py index 62ed378..befbdf1 100644 --- a/ATRI/plugins/manage/__init__.py +++ b/ATRI/plugins/manage/__init__.py @@ -415,7 +415,17 @@ track_error = Manage().on_command("追踪", "获取报错信息,传入追踪� @track_error.handle() -async def _track_error(event: MessageEvent): - track_id = str(event.message).strip() - repo = await Manage().track_error(track_id) +async def _track_error(matcher: Matcher, args: Message = CommandArg()): + msg = args.extract_plain_text() + if msg: + matcher.set_arg("track_code", args) + + +@track_error.got("track_code", "报错码 速速") +async def _(track_code: str = ArgPlainText("track_code")): + quit_list = ["算了", "罢了"] + if track_code in quit_list: + await track_error.finish("好吧...") + + repo = await Manage().track_error(track_code) await track_error.finish(repo) |