src/Commands/AdminCommands/CleanupCommand.php 1 location
|
@@ 331-343 (lines=13) @@
|
328 |
|
* |
329 |
|
* @return \Longman\TelegramBot\Entities\ServerResponse |
330 |
|
*/ |
331 |
|
public function executeNoDb() |
332 |
|
{ |
333 |
|
$message = $this->getMessage(); |
334 |
|
$chat_id = $message->getChat()->getId(); |
335 |
|
|
336 |
|
$data = [ |
337 |
|
'chat_id' => $chat_id, |
338 |
|
'parse_mode' => 'Markdown', |
339 |
|
'text' => '*No database connection!*', |
340 |
|
]; |
341 |
|
|
342 |
|
return Request::sendMessage($data); |
343 |
|
} |
344 |
|
|
345 |
|
/** |
346 |
|
* Command execute method |
src/Commands/Command.php 1 location
|
@@ 193-205 (lines=13) @@
|
190 |
|
* @return \Longman\TelegramBot\Entities\ServerResponse |
191 |
|
* @throws \Longman\TelegramBot\Exception\TelegramException |
192 |
|
*/ |
193 |
|
public function executeNoDb() |
194 |
|
{ |
195 |
|
//Preparing message |
196 |
|
$message = $this->getMessage(); |
197 |
|
$chat_id = $message->getChat()->getId(); |
198 |
|
|
199 |
|
$data = [ |
200 |
|
'chat_id' => $chat_id, |
201 |
|
'text' => 'Sorry no database connection, unable to execute "' . $this->name . '" command.', |
202 |
|
]; |
203 |
|
|
204 |
|
return Request::sendMessage($data); |
205 |
|
} |
206 |
|
|
207 |
|
/** |
208 |
|
* Get update object |