<?php /** * Teebot console listener. Through this script Teebot will be started as demon and will continuously * request an updates from Telegram's servers. * * @author Stan Drozdov <*****@*****.**> */ define('ROOT_DIR', realpath(__DIR__)); $paths = [ROOT_DIR . '/vendor/autoload.php', ROOT_DIR . '/../../autoload.php']; foreach ($paths as $path) { if (file_exists($path)) { require_once $path; } } $client = new Teebot\Client(); $client->listen();
<?php /** * An example of how to run Teebot in webhook mode. * * @author Stan Drozdov <*****@*****.**> */ require_once realpath(__DIR__) . '/vendor/autoload.php'; $client = new \Teebot\Client(['n' => 'Example']); $response = $client->webhook();