From e306b9fcc5085cd4e0f3d5d26165fdbc898ebabb Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Wed, 8 Feb 2017 12:26:25 +0100 Subject: [PATCH] Move strings to strings.py --- bot.py | 8 ++++++-- strings.py | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 strings.py diff --git a/bot.py b/bot.py index 57c1fa1..896b859 100755 --- a/bot.py +++ b/bot.py @@ -1,15 +1,19 @@ #!/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) 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!") + 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("auth", auth)) try: updater.start_polling() diff --git a/strings.py b/strings.py new file mode 100644 index 0000000..024b1b3 --- /dev/null +++ b/strings.py @@ -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!'''