Closed danielberlin closed 8 years ago
And now I get this error in the web server's log with above minimum example:
PHP Catchable fatal error: Argument 1 passed to Longman\\TelegramBot\\Entities\\ServerResponse::__construct() must be of the type array, null given, called in /www/bot/vendor/longman/telegram-bot/src/Request.php on line 151 and defined in /www/bot/vendor/longman/telegram-bot/src/Entities/ServerResponse.php on line 26
But this should be logged in TelegramException.log instead of the web server's error_log, shouldn't it?
I've the same problem; if you fix please contact me :D
@weiddolo Which of the problems I described above do you have?
Example are provided, see in the main dir example-* files. Line uncommented are mandatory. Commands are triggered when are wrote by the users in the chats, you don't have to call them before handle methods.
Then I can only report that example-hook.php never worked when I type /echo
in a chat. No answer in the chat. No logging about this. MySQL logging works, but sometimes not with this error:
2015-10-05 20:08:39 exception 'Longman\TelegramBot\Exception\TelegramException' with message 'Input is empty!'
I try to set up hook.php but with little success so far.
works so far.
$telegram->handle()
?), MySQL logging stops working and the web server error_log logs 500 Internal Server Error (see #39).php hook.php
from command line, then the exception saysexception 'Longman\TelegramBot\Exception\TelegramException' with message 'Input is empty!'
so exception logging should work.echo
orwhoami
?Is this correct?
Or this way?
$telegram->executeCommand('echo', $update);
Or both? I cannot figure this out without diving into the classes but it should be clear in the documentation already.
The point is, I believe that Telegram API stops sending me requests if I produce to many server errors. Because after trying this out, even the basic example above stops working (MySQL no longer logs anything) and I have to wait a day or so and suddenly it works again.
Please provide a minimum working example in
README.md
with which users can instantly get at least the/echo
Telegram bot command working.I don't know if this would be a minimum working example, but please add something like the following to
README.md
to make it clear and instantly get a working bot:If this would be easy to get started with, I think it will be a great success! Thank you.