Commit b2e1c34c authored by Jack'lul's avatar Jack'lul

Requests Limiter enabled by default

parent d7bf693d
...@@ -60,6 +60,9 @@ try { ...@@ -60,6 +60,9 @@ try {
//$telegram->setDownloadPath('../Download'); //$telegram->setDownloadPath('../Download');
//$telegram->setUploadPath('../Upload'); //$telegram->setUploadPath('../Upload');
// Requests Limiter (tries to prevent reaching Telegram API limits)
$telegram->enableLimiter();
// Run user selected commands // Run user selected commands
$telegram->runCommands($commands); $telegram->runCommands($commands);
} catch (Longman\TelegramBot\Exception\TelegramException $e) { } catch (Longman\TelegramBot\Exception\TelegramException $e) {
......
...@@ -67,7 +67,7 @@ try { ...@@ -67,7 +67,7 @@ try {
//$telegram->enableBotan('your_token', ['timeout' => 3]); //$telegram->enableBotan('your_token', ['timeout' => 3]);
// Requests Limiter (tries to prevent reaching Telegram API limits) // Requests Limiter (tries to prevent reaching Telegram API limits)
//$telegram->enableLimiter(); $telegram->enableLimiter();
// Handle telegram getUpdates request // Handle telegram getUpdates request
$serverResponse = $telegram->handleGetUpdates(); $serverResponse = $telegram->handleGetUpdates();
......
...@@ -66,7 +66,7 @@ try { ...@@ -66,7 +66,7 @@ try {
//$telegram->enableBotan('your_token', ['timeout' => 3]); //$telegram->enableBotan('your_token', ['timeout' => 3]);
// Requests Limiter (tries to prevent reaching Telegram API limits) // Requests Limiter (tries to prevent reaching Telegram API limits)
//$telegram->enableLimiter(); $telegram->enableLimiter();
// Handle telegram webhook request // Handle telegram webhook request
$telegram->handle(); $telegram->handle();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment