First iteration
This commit is contained in:
13
public_html/hook.php
Normal file
13
public_html/hook.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
require __DIR__ . '/../env.php';
|
||||
|
||||
try {
|
||||
$telegram = new Longman\TelegramBot\Telegram($bot_api_key, $bot_username);
|
||||
$telegram->addCommandsPath(realpath(__DIR__ . '/../src/Commands'));
|
||||
|
||||
// Handle telegram webhook request
|
||||
$telegram->handle();
|
||||
} catch (Longman\TelegramBot\Exception\TelegramException $e) {
|
||||
// file_put_contents(__DIR__ . '/../out.txt', $e->getMessage());
|
||||
}
|
||||
Reference in New Issue
Block a user