mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 03:15:24 +08:00
✨ allow change handlers list when running
This commit is contained in:
parent
cd12718dcb
commit
9f15b69724
@ -579,7 +579,7 @@ class Matcher(metaclass=MatcherMeta):
|
||||
bot, event) if self._default_state_factory else self.state
|
||||
self.state.update(state)
|
||||
|
||||
for _ in range(len(self.handlers)):
|
||||
while self.handlers:
|
||||
handler = self.handlers.pop(0)
|
||||
await handler(self, bot, event, self.state)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user