mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 09:05:04 +08:00
🐛 fix group attrs
This commit is contained in:
parent
3e4dc1a123
commit
d71260ed68
@ -304,9 +304,12 @@ class MatcherGroup:
|
|||||||
self.priority = priority
|
self.priority = priority
|
||||||
self.block = block
|
self.block = block
|
||||||
self.module = module
|
self.module = module
|
||||||
self.default_state = default_state
|
|
||||||
self.expire_time = expire_time
|
self.expire_time = expire_time
|
||||||
|
|
||||||
|
self._default_state = default_state
|
||||||
|
|
||||||
|
self._default_parser: Optional[ArgsParser] = None
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return (
|
return (
|
||||||
f"<MatcherGroup from {self.module or 'unknow'}, type={self.type}, "
|
f"<MatcherGroup from {self.module or 'unknow'}, type={self.type}, "
|
||||||
@ -335,7 +338,8 @@ class MatcherGroup:
|
|||||||
priority=priority or self.priority,
|
priority=priority or self.priority,
|
||||||
block=block or self.block,
|
block=block or self.block,
|
||||||
module=module or self.module,
|
module=module or self.module,
|
||||||
default_state=default_state or self.default_state,
|
default_state=default_state or
|
||||||
|
self._default_state,
|
||||||
expire_time=expire_time or self.expire_time)
|
expire_time=expire_time or self.expire_time)
|
||||||
self.matchers.append(matcher)
|
self.matchers.append(matcher)
|
||||||
return matcher
|
return matcher
|
||||||
|
Loading…
Reference in New Issue
Block a user