Rearchitect for different types of response
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user