From the course: Learn API Programming by Building a Telegram Bot
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Solution: Auto-reply to a customer's inquiry - PHP Tutorial
From the course: Learn API Programming by Building a Telegram Bot
Solution: Auto-reply to a customer's inquiry
(gentle music) - [Instructor] The challenge was to have our bot do two things in response to a single user input. It already forwards help requests to a specified Telegram user. And I can show you that by going through the process again. Here in the bot, I'll first type /gethelp, then I want the other kind of help and I'll fill in my problem. And because I also have the recipient's account loaded into my Telegram, we'll see it come through in the other account, but we won't see any kind of confirmation here. So you see the user doesn't actually get a sense of closure after typing in their problem. So I want it to show a confirmation message. Now the API can't do this by itself. It accepts only a single chat ID, method and set of post fields at a time. And because the Telegram bot API is stateless, it has no memory of what just happened. You can't tell it first do this, then do that. The only way to send multiple…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.