telegram-bot-sdk: I am using v2.2.0 of the package and cant run any command

I am using v2.2.0 of this brilliant package and I am wondering how to fire a command by user!! I used this way for creating a command for my bot: at first I added bellow line to telegram.php App\Http\Controllers\StartCommand::class then I created StartCommand.php at App\Http\Controllers folder as the documentation example StartCommand.php then I started webhook and it gaved me {"ok":true,"result":true,"description":"Webhook is already set"}

afterall I used this route for commandhandler and disabled csrf token too: Route::post('/test/webhook', function () { $update = Telegram::commandsHandler(true); return 'salam in revale'; }); the route can be reached by this address and its ok. but in my bot @yamatabot the /start command doesn not work yet. what step is wrong for me?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

It doesn’t work with postman. It’s not designed for that. I highly recommend you to go through the docs once again to better understand how this package works. Thanks!

thank you. I commented $this->triggerCommand('subscribe'); but when I /start the bot it does not do any thing! 😐 webhook is set and posting to this return ok. but when I use start command to @yamatabot it has no response!