If bot has no messages
attribute, set it
This commit is contained in:
parent
a24d1b3ef5
commit
8ac12707b6
@ -491,6 +491,8 @@ async def _talk_button(update, bot):
|
|||||||
|
|
||||||
def init(bot):
|
def init(bot):
|
||||||
"""Assign parsers, commands, buttons and queries to given `bot`."""
|
"""Assign parsers, commands, buttons and queries to given `bot`."""
|
||||||
|
if not hasattr(bot, 'messages'):
|
||||||
|
bot.messages = dict()
|
||||||
bot.messages['talk'] = TALK_MESSAGES
|
bot.messages['talk'] = TALK_MESSAGES
|
||||||
with bot.db as db:
|
with bot.db as db:
|
||||||
if 'talking_sessions' not in db.tables:
|
if 'talking_sessions' not in db.tables:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user