mirror of
https://github.com/danog/filtersbot.git
synced 2024-11-30 04:19:09 +01:00
20 lines
451 B
PHP
20 lines
451 B
PHP
<?php
|
|
// Load composer
|
|
require __DIR__ . '/vendor/autoload.php';
|
|
|
|
$API_KEY = 'your_bot_api_key';
|
|
$BOT_NAME = 'username_bot';
|
|
try {
|
|
// Create Telegram API object
|
|
$telegram = new Longman\TelegramBot\Telegram($API_KEY, $BOT_NAME);
|
|
|
|
// Unset webhook
|
|
$result = $telegram->unsetWebHook();
|
|
|
|
if ($result->isOk()) {
|
|
echo $result->getDescription();
|
|
}
|
|
} catch (Longman\TelegramBot\Exception\TelegramException $e) {
|
|
echo $e;
|
|
}
|