fix some bug

This commit is contained in:
yanyongyu
2020-08-23 10:45:26 +08:00
parent 87a848d8c3
commit a895089a8b
8 changed files with 39 additions and 18 deletions

View File

@ -125,3 +125,11 @@ def regex(regex: str, flags: Union[int, re.RegexFlag] = 0) -> Rule:
return bool(pattern.search(str(event.message)))
return Rule(_regex)
def to_me() -> Rule:
async def _to_me(bot: Bot, event: Event, state: dict) -> bool:
return bool(event.to_me)
return Rule(_to_me)