i use server on Debian 8 with ISP 5. I have installed that lib: https://github.com/akalongman/php-telegram-bot. Webhook was set but bot doesn't respond messages and commands. Server hadn't logs, I do not know what the problem is :(
I received a SSL from Let's Encrypt in ISP Manager for IP adress. enter image description here
Here is my set.php
<?php
// Load composer
require __DIR__ . '/vendor/autoload.php';
$API_KEY = 'key';
$BOT_NAME = 'evtepo_bot';
$hook_url = 'https://213./hook.php';
try {
// Create Telegram API object
$telegram = new Longman\TelegramBot\Telegram($API_KEY, $BOT_NAME);
// Set webhook
$result = $telegram->setWebhook($hook_url);
if ($result->isOk()) {
echo $result->getDescription();
}
} catch (Longman\TelegramBot\Exception\TelegramException $e) {
echo $e;
}
And hook.php
<?php
// Load composer
require __DIR__ . '/vendor/autoload.php';
$API_KEY = 'key';
$BOT_NAME = 'evtepo_bot';
$commands_path = __DIR__ . '/Commands/';
try {
// Create Telegram API object
$telegram = new Longman\TelegramBot\Telegram($API_KEY, $BOT_NAME);
// Handle telegram webhook request
$telegram->handle();
} catch (Longman\TelegramBot\Exception\TelegramException $e) {
echo $e;
\Longman\TelegramBot\TelegramLog::initErrorLog(__DIR__ . '/' . $BOT_NAME . '_error.log');
\Longman\TelegramBot\TelegramLog::initDebugLog(__DIR__ . '/' . $BOT_NAME . '_debug.log');
\Longman\TelegramBot\TelegramLog::initUpdateLog(__DIR__ . '/' . $BOT_NAME . '_update.log');
}
$telegram->addCommandsPath($commands_path);