17 lines
505 B
Python
Executable file
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()
|