Closed Marijnk7 closed 7 years ago
By default bot comes with public commands that do not reply.
Try executing /debug
command, it should work out of the box. Make sure your custom commands path is included in the output, if it doesn't then there is path error in $telegram->addCommandsPath(app_path('Telegram\Commands'));
!
As @jacklul noted, there are no built-in public commands that create output. For some example commands, like /help
, have a look at the separate example-bot repository.
Also, as a side-note, the user ID you pass to enableAdmin
must be an integer, not string.
@jacklul @noplanman
Thank you! i've solved it. When i changed: enableAdmin to an integer the default commands worked. However i did not get any error message or whatsoever.
By the debug command i did not find my own command path. Eventually i found out my directory separator was facing the wrong way \ instead of / And i didn't have a trailing separator. I also did not receive an error message any where.
And now it works like a charm 👍
Did you have the logging enabled? If so, you should have seen error entries there 😕
Anyway, good to see you've got it running!
Required Information
Expected behaviour
command: /help should return data to the message
Actual behaviour
The messages is stored in the database but does not send a message to the chat. Table: telegrammessage (i have telegram as prefix) text column: /help entities column: [{"type":"bot_command","offset":0,"length":5}]
Steps to reproduce
Extra details
I use laravel. I do not get any logs for nginx or laravel it self. I do get the access log and there it gives a status code 200.
I can send messages with Request:sendMessage()
What can be the problem?