Skip to content

Commit

Permalink
[Hockey] Fix an issue where if a role was present to be pinged on a g…
Browse files Browse the repository at this point in the history
…oal update the goal message could not be edited correctly.
  • Loading branch information
TrustyJAID committed Mar 29, 2024
1 parent ea3e100 commit cf3c5f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hockey/goal.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,12 @@ async def edit_goal(
if channel.id in game_day_threads:
role = None
if channel.permissions_for(channel.guild.me).embed_links:
if role is None or self.type_code is not GameEventTypeCode.GOAL:
if role is None or self.type_code.value != 505: # Goal type_code value
await message.edit(embed=send_em)
else:
await message.edit(content=role.mention, embed=send_em)
else:
if role is None or self.type_code is not GameEventTypeCode.GOAL:
if role is None or self.type_code.value != 505: # Goal type_code value
await message.edit(content=text)
else:
await message.edit(content=f"{role.mention}\n{text}")
Expand Down

0 comments on commit cf3c5f3

Please sign in to comment.