From 6f6edfdae9bfa607d6874b03c078da4e61c556b9 Mon Sep 17 00:00:00 2001 From: Davte Date: Sat, 24 Nov 2018 18:48:15 +0100 Subject: [PATCH] Undefined names --- davtelepot/__init__.py | 2 +- davtelepot/admin_tools.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index 5c2416b..07448da 100644 --- a/davtelepot/__init__.py +++ b/davtelepot/__init__.py @@ -7,7 +7,7 @@ __author__ = "Davide Testa" __email__ = "davte@libero.it" __credits__ = "Marco Origlia" __license__ = "GNU General Public License v3.0" -__version__ = "1.4.7" +__version__ = "1.4.8" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/davtelepot/admin_tools.py b/davtelepot/admin_tools.py index 8efd0cf..06f55be 100644 --- a/davtelepot/admin_tools.py +++ b/davtelepot/admin_tools.py @@ -50,7 +50,7 @@ TALK_MESSAGES = dict( ) -def get_talk_panel(text, bot): +def get_talk_panel(text, bot, update): """Return text and reply markup of talk panel. Get 'user_id' as string, username as string or void string for main menu. @@ -175,13 +175,14 @@ async def _talk_command(update, bot): bot, ['talk'] ) - text, reply_markup = get_talk_panel(text, bot) + text, reply_markup = get_talk_panel(text, bot, update) return async def _talk_button(update, bot): telegram_id = update['from']['id'] command, *arguments = extract(update['data'], '///').split('|') + result, text, reply_markup = '', '', None if text: return dict( text=result, @@ -210,7 +211,7 @@ def init(bot): @bot.additional_task(when='BEFORE') async def load_talking_sessions(): - with botd.db as db: + with bot.db as db: for session in db.query( """SELECT * FROM talking_sessions