Skip to content

Commit

Permalink
fix: 事件响应器现在将阻断事件的传播
Browse files Browse the repository at this point in the history
  • Loading branch information
he0119 committed Aug 4, 2024
1 parent cb7bc6a commit 2afb278
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/zh-CN/

## [Unreleased]

### Changed

- 事件响应器现在将阻断事件的传播

## [0.3.0] - 2024-06-28

### Added
Expand Down
11 changes: 9 additions & 2 deletions nonebot_plugin_user/matchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
Option("-l", Args["name", str]),
),
use_cmd_start=True,
block=True,
)


Expand All @@ -52,7 +53,11 @@ async def _(session: UserSession, name: Match[str]):
)


inspect_cmd = on_alconna(Alconna("inspect"), use_cmd_start=True)
inspect_cmd = on_alconna(
Alconna("inspect"),
use_cmd_start=True,
block=True,
)


@inspect_cmd.handle()
Expand Down Expand Up @@ -82,7 +87,9 @@ def generate_token() -> str:


bind_cmd = on_alconna(
Alconna("bind", Option("-r"), Args["token?", str]), use_cmd_start=True
Alconna("bind", Option("-r"), Args["token?", str]),
use_cmd_start=True,
block=True,
)


Expand Down

0 comments on commit 2afb278

Please sign in to comment.