python-telegram-bot

We have made you a wrapper you can't refuse

Star Fork


It's fun

from telegram.ext import Updater, CommandHandler

def start(bot, update):
    update.message.reply_text('Hello World!')

def hello(bot, update):
    update.message.reply_text(
        'Hello {}'.format(update.message.from_user.first_name))

updater = Updater('YOUR TOKEN HERE')

updater.dispatcher.add_handler(CommandHandler('start', start))
updater.dispatcher.add_handler(CommandHandler('hello', hello))

updater.start_polling()
updater.idle()

Easy to setup

$ pip install python-telegram-bot
$ python bot.py

And it is free

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