🔥 improve matcher store

This commit is contained in:
yanyongyu 2021-04-02 01:09:40 +08:00
parent 0eadf5f4e9
commit 85f0023350

View File

@ -65,8 +65,9 @@ class Plugin(object):
def _store_matcher(matcher: Type[Matcher]):
plugin_name = matcher.module.split(".", maxsplit=1)[0]
_plugin_matchers[plugin_name].add(matcher)
if matcher.module:
plugin_name = matcher.module.split(".", maxsplit=1)[0]
_plugin_matchers[plugin_name].add(matcher)
def on(type: str = "",