2023-02-20 21:27:43 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require __DIR__ . DIRECTORY_SEPARATOR . 'autoload.php';
|
|
|
|
import('net.nosial.tamerlib');
|
|
|
|
|
2023-08-10 14:25:05 -04:00
|
|
|
$bot = new TgBotLib\Bot('<BOT TOKEN>');
|
2023-02-20 21:27:43 -05:00
|
|
|
|
|
|
|
$bot->setCommandHandler('start', new \commands\StartCommand());
|
|
|
|
$bot->setCommandHandler('hash', new \commands\HashCommand());
|
|
|
|
|
2023-08-10 14:25:05 -04:00
|
|
|
\TamerLib\tm::initialize(\TamerLib\Enums\TamerMode::WORKER);
|
|
|
|
\TamerLib\tm::addFunction('handle_update', [$bot, 'handleUpdate']);
|
|
|
|
\TamerLib\tm::run();
|