Queer European MD passionate about IT
Browse Source

Undefined names

Davte 6 years ago
parent
commit
6f6edfdae9
2 changed files with 5 additions and 4 deletions
  1. 1 1
      davtelepot/__init__.py
  2. 4 3
      davtelepot/admin_tools.py

+ 1 - 1
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"
 

+ 4 - 3
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