Major revision 2

This commit is contained in:
Mattia Mascarello
2023-02-07 01:27:52 +01:00
parent 6a005fd277
commit 88ce5972b4
919 changed files with 16257 additions and 829872 deletions

31
handlers/Inspire.php Normal file
View File

@ -0,0 +1,31 @@
<?php
use \TelegramBot\Api\Types\Message;
use \TelegramBot\Api\Client;
class Inspire extends Command
{
public static function exposedCommands(): array
{
return [];
}
public function __construct(Message $message, Client $bot)
{
parent::__construct($message, $bot);
}
public function execute(): void
{
$url = file_get_contents("https://inspirobot.me/api?generate=true");
$this->bot->sendChatAction($this->message->getChat()->getId(), "upload_photo");
$this->bot->sendPhoto(
$this->message->getChat()->getId(),
$url,
null,
$this->message->getMessageId(),
null,
null,
"HTML"
);
}
}