forked from Cryz/battle_royale_sim
fix loop requesting seconds
This commit is contained in:
4
bot.py
4
bot.py
@@ -15,6 +15,10 @@ from bot_libs import commands_handling as _bot_commands
|
||||
|
||||
async def bot_start(update, context):
|
||||
await update.message.reply_text(_botsyms.START_MSG)
|
||||
if 'ask_name' in context.application.bot_data:
|
||||
del(context.application.bot_data['ask_name'])
|
||||
if 'ask_seconds' in context.application.bot_data:
|
||||
del(context.application.bot_data['ask_seconds'])
|
||||
|
||||
keyboard = [
|
||||
['Init/Restart'],
|
||||
|
||||
@@ -29,6 +29,8 @@ async def get_seconds_from_input(context, update, chat_id, text):
|
||||
try: text= int(text)
|
||||
except: return
|
||||
seconds= max(1, text)
|
||||
if 'ask_seconds' in context.application.bot_data:
|
||||
del(context.application.bot_data['ask_seconds'])
|
||||
return await _bot_repeat.start_loop_game(update, context, seconds)
|
||||
|
||||
### basic commands handling
|
||||
|
||||
Reference in New Issue
Block a user