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