allow change handlers list when running

This commit is contained in:
yanyongyu 2021-06-18 16:27:41 +08:00
parent cd12718dcb
commit 9f15b69724

View File

@ -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)