Undefined names
This commit is contained in:
parent
4ef0648892
commit
6f6edfdae9
@ -7,7 +7,7 @@ __author__ = "Davide Testa"
|
|||||||
__email__ = "davte@libero.it"
|
__email__ = "davte@libero.it"
|
||||||
__credits__ = "Marco Origlia"
|
__credits__ = "Marco Origlia"
|
||||||
__license__ = "GNU General Public License v3.0"
|
__license__ = "GNU General Public License v3.0"
|
||||||
__version__ = "1.4.7"
|
__version__ = "1.4.8"
|
||||||
__maintainer__ = "Davide Testa"
|
__maintainer__ = "Davide Testa"
|
||||||
__contact__ = "t.me/davte"
|
__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.
|
"""Return text and reply markup of talk panel.
|
||||||
|
|
||||||
Get 'user_id' as string, username as string or void string for main menu.
|
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,
|
bot,
|
||||||
['talk']
|
['talk']
|
||||||
)
|
)
|
||||||
text, reply_markup = get_talk_panel(text, bot)
|
text, reply_markup = get_talk_panel(text, bot, update)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
async def _talk_button(update, bot):
|
async def _talk_button(update, bot):
|
||||||
telegram_id = update['from']['id']
|
telegram_id = update['from']['id']
|
||||||
command, *arguments = extract(update['data'], '///').split('|')
|
command, *arguments = extract(update['data'], '///').split('|')
|
||||||
|
result, text, reply_markup = '', '', None
|
||||||
if text:
|
if text:
|
||||||
return dict(
|
return dict(
|
||||||
text=result,
|
text=result,
|
||||||
@ -210,7 +211,7 @@ def init(bot):
|
|||||||
|
|
||||||
@bot.additional_task(when='BEFORE')
|
@bot.additional_task(when='BEFORE')
|
||||||
async def load_talking_sessions():
|
async def load_talking_sessions():
|
||||||
with botd.db as db:
|
with bot.db as db:
|
||||||
for session in db.query(
|
for session in db.query(
|
||||||
"""SELECT *
|
"""SELECT *
|
||||||
FROM talking_sessions
|
FROM talking_sessions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user