Rearchitect for different types of response

This commit is contained in:
2018-12-20 21:10:39 +00:00
parent a8c3fa4a00
commit d72474e296
5 changed files with 74 additions and 27 deletions

View File

@@ -2,18 +2,15 @@
require_once 'MessageHandler.php';
class TestHandler implements MessageHandler
class TestHandler extends MessageHandler
{
public function CanHandle($room_id, $msgid, $message): bool
public function TryHandle($room_id, $msgid, $message, $room_lang): bool
{
// TODO: Implement canHandle() method.
return $msgid == 0;
}
if($msgid != 0)
return false;
public function Handle($room_id, $msgid, $message): string
{
// TODO: Implement handle() method.
return "uwu";
$this->sendMessage($room_id, "uwu");
return true;
}
}