public function help() { $channel = $this->event->getRequest()->getSource(); $lines = array('This is OftBot - a 1, 4, 24 IRC bot.', ' OftBot receives commands of the form \'@oftbot <command>\'.', ' OftBot accepts these commands: suggest, killgame, join, leave, kick, start, roll, keep (also available as k), help, and status.', ' For more information, see https://github.com/triplepoint/OftBot .'); foreach ($lines as $line) { $this->event->addResponse(Response::notice($channel, $line)); } }
/** * Add an error message to the response. * * @param \Philip\IRC\Event $event The event to add a response to * @param string $msg The error message to send * * @return void */ public function addErrorMsg($event, $msg) { $event->addResponse(Response::msg($event->getRequest()->getSource(), $msg)); }
public function testGetRequest() { $this->if($this->mockGenerator->shuntParentClassCalls())->and($request = new \mock\Philip\IRC\Request($raw = uniqid()))->and($object = new TestedClass($request))->then->object($object->getRequest())->isIdenticalTo($request); }