From 929138f3c8fe2299a5b05f2d6a4bccdda947e204 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Wed, 22 Mar 2017 12:18:07 +0100 Subject: [PATCH] Remove pointless imports, fix /start string --- bottools/methods.py | 2 +- bottools/strings.py | 2 +- telegrambot.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bottools/methods.py b/bottools/methods.py index a636ba1..b6c2fec 100644 --- a/bottools/methods.py +++ b/bottools/methods.py @@ -37,7 +37,7 @@ def twoExceptions(e, message): # --------------- def start(bot, update): - update.message.reply_text(bottools.strings.start % (setuptools.botname(), setuptools.botname())) + update.message.reply_text(bottools.strings.start % {"name": setuptools.botname()}) def fish(bot, update): dbtools.dbHelper().addFish(update.message.chat_id) diff --git a/bottools/strings.py b/bottools/strings.py index 860eab6..2de9aa0 100644 --- a/bottools/strings.py +++ b/bottools/strings.py @@ -17,7 +17,7 @@ noauth = '''You are not logged in. Please use /login to sign in with Twitter.''' start = '''Hey there! -I'm @%s, everybody's favorite Twitter bot on Telegram! +I'm @%(name)s, everybody's favorite Twitter bot on Telegram! For me to help you, you will first have to authenticate with Twitter: diff --git a/telegrambot.py b/telegrambot.py index 507ba5f..62f9ed1 100755 --- a/telegrambot.py +++ b/telegrambot.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import ast, bottools.methods, dbtools, html, io, logging, moviepy.editor, PIL.Image, random, setuptools, string, bottools.strings, telegram.ext, twitools, urllib.request, tweepy +import bottools.methods, logging, setuptools, telegram.ext logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) logger = logging.getLogger(__name__)