АW
Size: a a a
АW
IC
АW
IC
АW
АW
IC
IC
use TelegramBot\Api\Client as TelegramBot;
IC
function (Request $request, Response $response, array $args) {
$bot = new TelegramBot(getenv('API_TOKEN'));
$document = new CURLFile(__DIR__ .'/files/test.txt');
$keyboard = new \TelegramBot\Api\Types\Inline\InlineKeyboardMarkup(
[
[
['text' => 'Сайт XXXXX 🏆', 'url' => 'https://XXXXXXX.com'],
['text' => 'Google 🕵️♂️', 'url' => 'https://google.com'],
]
]
);
$bot->sendMessage(getenv('CHAT_ROOM'), 'Где лежит документация?', null, false, null, $keyboard);
$bot->sendDocument('XXXXXXX', $document);
$bot->sendMessage('XXXXXXXXXX', 'Я живой!');
$payload = json_encode([
'hello' => 'world',
'api-key' => getenv('API_TOKEN')
], JSON_PRETTY_PRINT);
$response->getBody()->write($payload);
return $response->withHeader('Content-Type', 'application/json');
}
S
S
АW
S
ММ
S
ММ
A
VO
S
VO