-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinfo.php
More file actions
22 lines (18 loc) · 704 Bytes
/
info.php
File metadata and controls
22 lines (18 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
require_once __DIR__ . '/vendor/autoload.php';
// Load all configuration options
/** @var array $config */
$config = require __DIR__ . '/config.php';
try {
$telegram = new Longman\TelegramBot\Telegram($config['api_key'], $config['bot_username']);
$result = $telegram->getVersion();
echo $result;
} catch (Longman\TelegramBot\Exception\TelegramException $e) {
// Log telegram errors
Longman\TelegramBot\TelegramLog::error($e);
// Uncomment this to output any errors (ONLY FOR DEVELOPMENT!)
echo $e;
} catch (Longman\TelegramBot\Exception\TelegramLogException $e) {
// Uncomment this to output log initialisation errors (ONLY FOR DEVELOPMENT!)
echo $e;
}