Move strings to strings.py
This commit is contained in:
parent
67ef0e448d
commit
e306b9fcc5
2 changed files with 23 additions and 2 deletions
8
bot.py
8
bot.py
|
@ -1,15 +1,19 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import logging, setuptools, telegram.ext
|
import logging, setuptools, strings, telegram.ext
|
||||||
|
|
||||||
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
|
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
|
||||||
|
|
||||||
updater = telegram.ext.Updater(token=setuptools.token())
|
updater = telegram.ext.Updater(token=setuptools.token())
|
||||||
|
|
||||||
def start(bot, update):
|
def start(bot, update):
|
||||||
bot.sendMessage(chat_id=update.message.chat_id, text="Heeeeeeey! :3\n\nWelcome to the Boooooooooot!")
|
bot.sendMessage(chat_id=update.message.chat_id, text=strings.start)
|
||||||
|
|
||||||
|
def auth(bot, update):
|
||||||
|
bot.sendMessage(chat_id=update.message.chat_id, text="Ooops. Not implemented yet.")
|
||||||
|
|
||||||
updater.dispatcher.add_handler(telegram.ext.CommandHandler("start", start))
|
updater.dispatcher.add_handler(telegram.ext.CommandHandler("start", start))
|
||||||
|
updater.dispatcher.add_handler(telegram.ext.CommandHandler("auth", auth))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
updater.start_polling()
|
updater.start_polling()
|
||||||
|
|
17
strings.py
Normal file
17
strings.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import setuptools
|
||||||
|
|
||||||
|
start = '''Hey there!
|
||||||
|
|
||||||
|
I'm @%s, everybody's favorite Twitter bot on Telegram!
|
||||||
|
|
||||||
|
For me to help you, you will first have to authenticate with Twitter:
|
||||||
|
|
||||||
|
* /auth
|
||||||
|
|
||||||
|
After authentication, you will be able to tweet from your account. Just drop me a note!
|
||||||
|
|
||||||
|
Additionally, you will be able to use the following commands:
|
||||||
|
|
||||||
|
* [Nothing yet. Sorry.]
|
||||||
|
|
||||||
|
Have fun!'''
|
Loading…
Reference in a new issue