🏷️ Add typing for cqhttp api

This commit is contained in:
yanyongyu
2020-08-26 17:47:36 +08:00
parent 24e03ed0e7
commit 777343ac1a
6 changed files with 688 additions and 9 deletions

View File

@ -34,6 +34,9 @@ async def _run_matcher(Matcher: Type[Matcher], bot: Bot, event: Event,
logger.exception(e)
return
# TODO: log matcher
logger.info(f"Event will be handled by {Matcher}")
matcher = Matcher()
# TODO: BeforeMatcherRun
try:
@ -102,7 +105,7 @@ async def handle_event(bot: Bot, event: Event):
e_list = result.exceptions
if StopPropagation in e_list:
break_flag = True
logger.debug("Stop event propafation")
logger.debug("Stop event propagation")
if ExpiredException in e_list:
del matchers[priority][index - i]
i += 1