🐛 fix aiohttp config trierule bugs

This commit is contained in:
yanyongyu
2021-12-27 02:26:02 +08:00
parent fd9ec5e6fa
commit c1e06c2ec0
3 changed files with 23 additions and 13 deletions

View File

@ -303,7 +303,12 @@ async def handle_event(bot: "Bot", event: "Event") -> None:
return
# Trie Match
TrieRule.get_value(bot, event, state)
try:
TrieRule.get_value(bot, event, state)
except Exception as e:
logger.opt(colors=True, exception=e).warning(
"Error while parsing command for event"
)
break_flag = False
for priority in sorted(matchers.keys()):