Using getUpdates needs a valid database connection.

Fixes #127
parent 990485bf
...@@ -291,6 +291,13 @@ class Telegram ...@@ -291,6 +291,13 @@ class Telegram
*/ */
public function handleGetUpdates($limit = null, $timeout = null) public function handleGetUpdates($limit = null, $timeout = null)
{ {
if (!DB::isDbConnected()) {
return new Entities\ServerResponse([
'ok' => false,
'description' => 'getUpdates needs MySQL connection!',
], $this->bot_name);
}
//DB Query //DB Query
$last_update = DB::selectTelegramUpdate(1); $last_update = DB::selectTelegramUpdate(1);
......
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