telegramtelegram-botpy-telegram-bot-apitelegram-webhook

How can Telegram Bot reply a specific commandusing Bot API?


I am trying to find a way to make my Telegram bots reply "Hello, please enter your phone number" whenever someone starts the bot using the default "/start" command. Is there a way to do this with Telegram Bot token and Telegram Bot API? Or is there a way for me to do this using BotFather?


Solution

  • You have to fetch the updates your bot gets. You can do this either by calling the getUpdates method constantly, or setting up Webhooks. For more on getting updates, head to Getting updates.