Add owo handler
This commit is contained in:
@@ -75,7 +75,7 @@ class OwOHandler extends MessageHandler
|
|||||||
{
|
{
|
||||||
public function TryHandle($room_id, $msgid, $message, $room_lang): bool
|
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;
|
return false;
|
||||||
|
|
||||||
$this->sendSticker($room_id, "CAADBAADUwAD7Z8MDl38hfMCvM06Ag");
|
$this->sendSticker($room_id, "CAADBAADUwAD7Z8MDl38hfMCvM06Ag");
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ require_once 'Handlers.php';
|
|||||||
$handlers = array(
|
$handlers = array(
|
||||||
new BeatHandler(),
|
new BeatHandler(),
|
||||||
new BlueRoomYiffHandler(),
|
new BlueRoomYiffHandler(),
|
||||||
new BoopTextHandler()
|
new BoopTextHandler(),
|
||||||
|
new OwOHandler()
|
||||||
);
|
);
|
||||||
|
|
||||||
function reply_user(int $room_id, int $msgid, string $message, $room_lang): bool
|
function reply_user(int $room_id, int $msgid, string $message, $room_lang): bool
|
||||||
|
|||||||
Reference in New Issue
Block a user