Команда

This commit is contained in:
Artem Vasilev 2022-11-01 15:30:27 +03:00
parent f7cf889a77
commit 8252b69e08

View File

@ -26,14 +26,21 @@ class RemoveJoinMessagesCommand extends SystemCommand
public function execute(): ServerResponse
{
$message = $this->getMessage();
ob_start();
echo "<pre>";
var_dump($message);
echo "</pre>";
$data = ob_get_clean();
return Request::sendMessage([
'text' => $data,
'parse_mode' => 'HTML'
]);
$this->replyToChat(ob_get_clean());
if (!!$message->getNewChatMembers() || !!$message->getLeftChatMember())
{
return Request::deleteMessage([
'chat_id' => $message->getChat()->getId(),
'message_id' => $message->getMessageId()
]);
}
return Request::emptyResponse();
}
}