fix bug: midway join confuse the bot
This commit is contained in:
parent
4639bf77bf
commit
8e95f58948
1 changed files with 4 additions and 1 deletions
5
bot.py
5
bot.py
|
@ -468,7 +468,10 @@ async def new_msg_handler(event):
|
||||||
logger.info('Bot: Game started. I\'m the first player.')
|
logger.info('Bot: Game started. I\'m the first player.')
|
||||||
game.start_game()
|
game.start_game()
|
||||||
logger.info('Bot: It\'s my turn.')
|
logger.info('Bot: It\'s my turn.')
|
||||||
if game.is_playing and game.joined and get_peer_id(unochat) in game.joined:
|
if game.joined and get_peer_id(unochat) in game.joined:
|
||||||
|
if not game.is_playing:
|
||||||
|
logger.info('Bot: Game started a long time ago. I joined midway.')
|
||||||
|
game.start_game()
|
||||||
await inline_query()
|
await inline_query()
|
||||||
else:
|
else:
|
||||||
logger.info('I\'m not playing in {} - {}'.format(full_info[1].title, get_peer_id(unochat)))
|
logger.info('I\'m not playing in {} - {}'.format(full_info[1].title, get_peer_id(unochat)))
|
||||||
|
|
Loading…
Reference in a new issue