Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Elijah Steres 2021-01-01 16:24:21 -05:00
commit dc8cdfa1c1

View File

@ -792,10 +792,11 @@ async def team_pages(msg, all_teams, search_term=None):
async def game_watcher():
while True:
try:
this_array = gamesarray.copy()
for i in range(0,len(this_array)):
game, channel, user, key = this_array[i]
if game.over and main_controller.master_games_dic[key][1]["end_delay"] <= 2:
if game.over and main_controller.master_games_dic[key][1]["end_delay"] <= 9:
title_string = f"{game.teams['away'].name} at {game.teams['home'].name} ended after {game.inning-1} innings"
if (game.inning - 1) > game.max_innings: #if extra innings
title_string += f" with {game.inning - (game.max_innings+1)} extra innings."
@ -821,6 +822,8 @@ async def game_watcher():
await channel.send(embed=final_embed)
gamesarray.pop(i)
break
except:
print("something broke in game_watcher")
await asyncio.sleep(6)