Skip to content

Commit 916de24

Browse files
committed
block parameter of CompConfig
1 parent 3254af5 commit 916de24

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/nonebot_plugin_alconna/model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class CompConfig(TypedDict):
8888
hides: NotRequired[set[Literal["tab", "enter", "exit"]]]
8989
disables: NotRequired[set[Literal["tab", "enter", "exit"]]]
9090
lite: NotRequired[bool]
91+
block: NotRequired[bool]
9192

9293

9394
class SubcommandModel(BaseModel):

src/nonebot_plugin_alconna/rule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ async def handle(
241241
def _checker(_event: Event):
242242
return session_id == _event.get_session_id()
243243

244-
w = waiter(["message"], Matcher, keep_session=True, block=False, rule=Rule(_checker))(self._waiter) # type: ignore
244+
w = waiter(["message"], Matcher, keep_session=True, block=self.comp_config.get("block", False), rule=Rule(_checker))(self._waiter) # type: ignore
245245

246246
while interface.available:
247247

0 commit comments

Comments
 (0)