From 1d65edf97024c7c19bd74270155648aaf776026d Mon Sep 17 00:00:00 2001 From: Sakimori Date: Wed, 24 Feb 2021 16:12:32 -0500 Subject: [PATCH 1/3] removed broken pinning for league standings --- the_prestige.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/the_prestige.py b/the_prestige.py index 74ee121..5d61edd 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -2265,10 +2265,7 @@ async def league_day_watcher(channel, league, games_list, filter_url, last = Fal wait_seconds = (next_start - now).seconds leagues.save_league(league) - if league in active_standings.keys(): - await active_standings[league].unpin() active_standings[league] = await channel.send(embed=league.standings_embed()) - active_standings[league].pin() await channel.send(f"The day {league.day} games for the {league.name} will start in {math.ceil(wait_seconds/60)} minutes.") await asyncio.sleep(wait_seconds) await channel.send(f"A {league.name} series is continuing now at {filter_url}") @@ -2277,10 +2274,7 @@ async def league_day_watcher(channel, league, games_list, filter_url, last = Fal league.active = False if league.autoplay <= 0 or config()["game_freeze"]: #if number of series to autoplay has been reached - if league in active_standings.keys(): - await active_standings[league].unpin() active_standings[league] = await channel.send(embed=league.standings_embed()) - active_standings[league].pin() await channel.send(f"The {league.name} is no longer autoplaying.") if config()["game_freeze"]: await channel.send("Patch incoming.") From ff74af005e4309ece36b58d8cf40cea86587daca Mon Sep 17 00:00:00 2001 From: Sakimori Date: Wed, 24 Feb 2021 16:19:11 -0500 Subject: [PATCH 2/3] fixed a bug making leagues autopause after a single series --- the_prestige.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/the_prestige.py b/the_prestige.py index 5d61edd..9b147fc 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -2273,7 +2273,7 @@ async def league_day_watcher(channel, league, games_list, filter_url, last = Fal else: league.active = False - if league.autoplay <= 0 or config()["game_freeze"]: #if number of series to autoplay has been reached + if league.autoplay == 0 or config()["game_freeze"]: #if number of series to autoplay has been reached active_standings[league] = await channel.send(embed=league.standings_embed()) await channel.send(f"The {league.name} is no longer autoplaying.") if config()["game_freeze"]: From e69552bcb9bf3952a3b7bec9088060dff67898bf Mon Sep 17 00:00:00 2001 From: Sakimori Date: Wed, 24 Feb 2021 16:32:45 -0500 Subject: [PATCH 3/3] removed leading spaces on some weather text --- weather.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weather.py b/weather.py index 49a5d73..b1ed3fc 100644 --- a/weather.py +++ b/weather.py @@ -157,7 +157,7 @@ class ThinnedVeil(Weather): def modify_atbat_message(self, game, state): if "veil" in game.last_update[0].keys(): state["update_emoji"] = self.emoji - state["update_text"] += f" {game.last_update[0]['batter']}'s will manifests on {base_string(game.last_update[1])} base." + state["update_text"] += f"{game.last_update[0]['batter']}'s will manifests on {base_string(game.last_update[1])} base." class HeatWave(Weather): def __init__(self,game): @@ -197,7 +197,7 @@ class HeatWave(Weather): original, sub = self.swapped_pitcher_data self.swapped_pitcher_data = None state["update_emoji"] = self.emoji - state["update_text"] += f' {original} is exhausted from the heat. {sub} is forced to pitch!' + state["update_text"] += f'{original} is exhausted from the heat. {sub} is forced to pitch!'