Botlegram: Telegram Bot Package for Python

It’s good to use. 🙆‍♂️

  • Quick Start
import botlegram

BOT_TOKEN = "{{your_bot_token}}"
WEBHOOK = "{{your_host}}" + BOT_TOKEN + '/'
bot = botlegram.Bot(BOT_TOKEN, WEBHOOK)
>>> * [Bot] Webhook is already set

Now we have a Telegram bot 🤖

Note

If you’d like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. https://www.example.com/<token>. Since nobody else knows your bot’s token, you can be pretty sure it’s from Telegram.

Ref. https://core.telegram.org/bots/api#setwebhook

Indices and tables