forked from vbatts/maubot
Make new command handling actually somewhat work
This commit is contained in:
parent
682eab348d
commit
5ff5eae3c6
6 changed files with 171 additions and 144 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue