Working version of project

This commit is contained in:
Mateusz Pieła 2021-04-26 23:01:23 +02:00
parent 0b21896cd5
commit 5411c00ee9
9 changed files with 259 additions and 46 deletions

27
classes/webhook.php Normal file
View file

@ -0,0 +1,27 @@
<?php
namespace Classes;
class Webhook extends Core
{
private $json;
public function __construct(string $json)
{
parent::__construct();
if($json)
{
$this->json = json_decode($json, false);
}
else
{
throw new \Exception("JSON is required to use this class");
}
}
public function getMessage()
{
return $this->json->text;
}
}
?>