1
0
Fork 0
forked from vbatts/maubot

Make new command handling actually somewhat work

This commit is contained in:
Tulir Asokan 2018-12-24 00:31:01 +02:00
parent 682eab348d
commit 5ff5eae3c6
6 changed files with 171 additions and 144 deletions

View file

@ -51,7 +51,7 @@ class Plugin(ABC):
async def start(self) -> None:
for key in dir(self):
val = getattr(self, key)
if hasattr(val, "__mb_event_handler__"):
if hasattr(val, "__mb_event_handler__") and val.__mb_event_handler__:
self._handlers_at_startup.append((val, val.__mb_event_type__))
self.client.add_event_handler(val.__mb_event_type__, val)