twitools/bot.py
Klaus-Uwe Mitterer 67ef0e448d Fix some stuff
2017-02-07 23:11:59 +01:00

17 lines
505 B
Python
Executable file

#!/usr/bin/env python3
import logging, setuptools, telegram.ext
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
updater = telegram.ext.Updater(token=setuptools.token())
def start(bot, update):
bot.sendMessage(chat_id=update.message.chat_id, text="Heeeeeeey! :3\n\nWelcome to the Boooooooooot!")
updater.dispatcher.add_handler(telegram.ext.CommandHandler("start", start))
try:
updater.start_polling()
except KeyboardInterrupt:
updater.stop()