diff --git a/src/Handlers.php b/src/Handlers.php index 0af17da..6cfb253 100644 --- a/src/Handlers.php +++ b/src/Handlers.php @@ -75,7 +75,7 @@ class OwOHandler extends MessageHandler { public function TryHandle($room_id, $msgid, $message, $room_lang): bool { - if(preg_match("pattern", $message) === false) + if(preg_match('/^\s+[o0][wω][o0]\s+$/i', $message) === false) return false; $this->sendSticker($room_id, "CAADBAADUwAD7Z8MDl38hfMCvM06Ag"); diff --git a/src/entryPoint.php b/src/entryPoint.php index f6540ac..d556679 100644 --- a/src/entryPoint.php +++ b/src/entryPoint.php @@ -22,7 +22,8 @@ require_once 'Handlers.php'; $handlers = array( new BeatHandler(), new BlueRoomYiffHandler(), - new BoopTextHandler() + new BoopTextHandler(), + new OwOHandler() ); function reply_user(int $room_id, int $msgid, string $message, $room_lang): bool