Skip to content

Commit

Permalink
[Hockey] Show edited events correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
TrustyJAID committed Aug 19, 2024
1 parent 9991737 commit 1d1ff02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hockey/hockeyset.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@ async def set_team_events(self, ctx: commands.Context, team: TeamFinder):
await existing_events[game_id].edit(
start_time=start, end_time=end, reason="Start time changed"
)
edited += 1
if existing_events[game_id].description != description:
await existing_events[game_id].edit(
description=description, reason="Description has changed"
)
edited += 1
edited += 1
except Exception:
# I don't care if these don't edit properly
pass
Expand All @@ -217,7 +218,7 @@ async def set_team_events(self, ctx: commands.Context, team: TeamFinder):
await asyncio.sleep(1)
msg = f"Finished creating events for {added}/{number_of_games} games."
if edited != 0:
msg += f"Edited {edited} events with changed details."
msg += f" Edited {edited} events with changed details."
await ctx.send(msg)

@hockeyset_commands.command(name="poststandings", aliases=["poststanding"])
Expand Down

0 comments on commit 1d1ff02

Please sign in to comment.