python-telegram-bot

We have made you a wrapper you can't refuse

Star Fork



It's fun

from telegram import Update
from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes


async def hello(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
    await update.message.reply_text(f'Hello {update.effective_user.first_name}')


app = ApplicationBuilder().token("YOUR TOKEN HERE").build()

app.add_handler(CommandHandler("hello", hello))

app.run_polling()

Easy to setup

$ # This installs the pre-release of v20
$ pip install python-telegram-bot --pre
$ python bot.py

And it is free

python-telegram-bot is distributed under a LGPLv3 license.