Commit 39b499e5 authored by Armando Lüscher's avatar Armando Lüscher

Add error message to /echo command if no input.

parent 24cb59cc
......@@ -36,7 +36,11 @@ class EchoCommand extends UserCommand
{
$message = $this->getMessage();
$chat_id = $message->getChat()->getId();
$text = $message->getText(true);
$text = trim($message->getText(true));
if ($text === '') {
$text = 'Command usage: ' . $this->getUsage();
}
$data = [
'chat_id' => $chat_id,
......
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