mirror of
https://github.com/kuitoi/kuitoi-Server.git
synced 2026-04-12 19:06:03 +00:00
callable fix
This commit is contained in:
@@ -19,9 +19,10 @@ class EventsSystem:
|
||||
|
||||
def register_event(self, event_name, event_func):
|
||||
self.log.debug(f"register_event({event_name}, {event_func}):")
|
||||
if callable(event_func):
|
||||
if not callable(event_func):
|
||||
self.log.error(f"Cannot add event '{event_name}'. "
|
||||
f"Use `BEAMP.add_event({event_name}', function)` instead. Skipping it...")
|
||||
return
|
||||
if event_name not in self.__events:
|
||||
self.__events.update({str(event_name): [event_func]})
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user