telegram-mathbot/mathbot/main.py

17 lines
411 B
Python
Raw Normal View History

2018-01-18 08:09:39 +00:00
from telegram.ext import Updater, CommandHandler, RegexHandler
from . import bot
def main(api_token):
updater = Updater(api_token)
dispatcher = updater.dispatcher
dispatcher.add_handler(CommandHandler("help", bot.help))
dispatcher.add_handler(CommandHandler("rmath", bot.render_math))
dispatcher.add_handler(CommandHandler("rcmath", bot.render_math_caption))
updater.start_polling()
updater.idle()