From 20b92b9f1949343ddaef503be688ae9b5ce6a8c9 Mon Sep 17 00:00:00 2001 From: HornCopper <68726147+HornCopper@users.noreply.github.com> Date: Fri, 23 Jun 2023 03:37:04 +0800 Subject: [PATCH] Fixed a problem from somebody's wrong action. --- src/plugins/developer_tools/__init__.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/plugins/developer_tools/__init__.py b/src/plugins/developer_tools/__init__.py index 648ad2b52..153c7713b 100644 --- a/src/plugins/developer_tools/__init__.py +++ b/src/plugins/developer_tools/__init__.py @@ -186,14 +186,11 @@ async def _(bot: Bot, event: GroupMessageEvent, args: Message = CommandArg()): await web.finish("获取图片成功!\n" + MessageSegment.image(Path(image).as_uri())) -apply = on_command("apply", aliases={"-申请","+申请"}, priority=5) # 申请使用机器人的命令,`repo`地址来源于`config.py`。 +apply = on_command("apply", aliases={"-申请"}, priority=5) # 申请使用机器人的命令,`repo`地址来源于`config.py`。 @apply.handle() -async def _(matcher:Matcher ,state: T_State, event: Event, group: Message = Arg()): +async def _(state: T_State, event: Event): applier = str(event.user_id) state["user"] = applier - group = group.extract_plain_text() - if group: - matcher.set_arg('group', group) return @apply.got("group", prompt="感谢您申请使用Inkar Suki,接下来请发送您所为之申请的群聊的群号。") @@ -230,4 +227,4 @@ async def _(bot: Bot, state: T_State, group: Message = Arg()): json=body ) logger.info(resp) - await apply.finish("申请成功,请求已发送至GitHub,请等待通知!") \ No newline at end of file + await apply.finish("申请成功,请求已发送至GitHub,请等待通知!")