/**
  * @param ConstructEvent $event
  */
 public function construct(ConstructEvent $event)
 {
     $client = new Client();
     $client->setLoop($event->getLoop());
     $bot = new Bot();
     $bot->setConfig(Configure::read('WyriHaximus.Phergie.config'));
     $bot->setClient($client);
     $bot->run(false);
     EventManager::instance()->dispatch(StartEvent::create($event->getLoop(), $bot));
 }
 public function start()
 {
     $this->loop = \WyriHaximus\PhergieBot\loopResolver();
     EventManager::instance()->dispatch(ConstructEvent::create($this->loop));
     $this->loop->run();
 }