Fix some stuff
This commit is contained in:
parent
33ade5451a
commit
67ef0e448d
1 changed files with 10 additions and 5 deletions
15
bot.py
15
bot.py
|
@ -1,12 +1,17 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import logging, telegram.ext
|
||||
import logging, setuptools, telegram.ext
|
||||
|
||||
updater = telegram.ext.Updater(token=setuptools.token)
|
||||
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")
|
||||
bot.sendMessage(chat_id=update.message.chat_id, text="Heeeeeeey! :3\n\nWelcome to the Boooooooooot!")
|
||||
|
||||
updater.dispatch.add_handler(telegram.ext.CommandHandler("start", start)
|
||||
updater.dispatcher.add_handler(telegram.ext.CommandHandler("start", start))
|
||||
|
||||
updater.start_polling()
|
||||
try:
|
||||
updater.start_polling()
|
||||
except KeyboardInterrupt:
|
||||
updater.stop()
|
||||
|
|
Loading…
Reference in a new issue