on method

void on(
  1. BaseEventType type,
  2. StandartUserCommand func
)

Implementation

void on(BaseEventType type, StandartUserCommand func) {
  if (handlers[type.getName()] == null) {
    handlers[type.getName()] = [];
  }
  handlers[type.getName()]!.add(LongPollEventHandler(type, func));
}