I am currently developing a Telegram bot and facing a specific challenge. My goal is to enable the bot to send a message I write, to the user immediately after they start the bot. I am not sure how to trigger the bot to send a message once the '/start' command is issued by the user.
Here's what I have done so far:
- Created the bot using BotFather.
- Set up a basic command handler for '/start'.
- Able to receive messages from the user.
However, I am stuck at the point where I need the bot to initiate a conversation with the user right after they send the '/start' command and then send the message each time I tell the bot. I am looking for guidance on how to implement this functionality.
Can anyone provide insights or examples on how to achieve this? Specifically, I am interested in:
- Detecting the '/start' command from the user.
- Sending a response message from the bot to the user, which I write every time, immediately after the command is received.