public function __construct(MessageEvent $event, ChatRoom $room) { $this->event = $event; $this->room = $room; $this->type = self::$eventTypeMap[$event->getTypeId()]; }
private function isCommandMessage(MessageEvent $event) { return strpos($event->getMessageContent()->textContent, '!!') === 0; }
public function __construct(array $data, ChatRoom $room) { parent::__construct($data, $room); $this->numberOfEdits = (int) $data['message_edits']; }