hi
i want to get message without command , but i can't
Inside a command object:
$text = $this->getMessage()->getText(true);
without command !
just in hook.php
$bot = new Longman\TelegramBot\Telegram('token', 'username');
$update = json_decode(Longman\TelegramBot\Request::getInput(), true);
$message = $update['message'];
Something like this?
Thank you ...
but it's in the loop
I do not want to be in the loop
what loop?
$update = json_decode(file_get_contents('php://input'), true);
$message = $update['message']
$text = $message['text'];
// now, preg_match or some wise parse $text
// to detect and remove "/command" from "/command something"
Thank you for your help ...
Most helpful comment
what loop?