Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Fixed a problem from somebody's wrong action.
Browse files Browse the repository at this point in the history
  • Loading branch information
HornCopper committed Jun 22, 2023
1 parent f9bba69 commit 20b92b9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/plugins/developer_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,接下来请发送您所为之申请的群聊的群号。")
Expand Down Expand Up @@ -230,4 +227,4 @@ async def _(bot: Bot, state: T_State, group: Message = Arg()):
json=body
)
logger.info(resp)
await apply.finish("申请成功,请求已发送至GitHub,请等待通知!")
await apply.finish("申请成功,请求已发送至GitHub,请等待通知!")

0 comments on commit 20b92b9

Please sign in to comment.