Undefined names
This commit is contained in:
parent
4ef0648892
commit
6f6edfdae9
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user