send highscore message doesn't need to return the message, its never used.

This commit is contained in:
2025-03-12 10:02:32 -04:00
parent ed68c4174f
commit dbc6474fc3
+3 -8
View File
@@ -328,9 +328,7 @@ def get_time_str(time_in: float) -> str:
return time.strftime(f"%-M:%S.{milliseconds}", time.gmtime(time_in))
async def send_highscore_message(
session: Session, guild: nextcord.Guild, group: CategoryGroup
) -> nextcord.Message | None:
async def send_highscore_message(session: Session, guild: nextcord.Guild, group: CategoryGroup) -> None:
"""
Function takes care of checking if a message exists for a group.
@@ -340,9 +338,6 @@ async def send_highscore_message(
session (Session): The sqlalchemy session being used for this function call.
guild (nextcord.Guild): the nextcord.Guild object requesting this message.
group (CategoryGroup): group to post to the message.
Returns:
nextcord.Message: Message object that was posted with group contents. None if cannot send message.
"""
highscore_string = format_highscore_message(session, group)
channel = guild.get_channel(group.channel_id)
@@ -351,7 +346,7 @@ async def send_highscore_message(
agon_logger.error(
"Channel id %s in guild %s is does not correspond to a TextChannel.", channel.id, channel.guild.id
)
return None
return
if group.message_id is None:
# message doesn't exist.
@@ -362,7 +357,7 @@ async def send_highscore_message(
message: nextcord.Message = await channel.fetch_message(group.message_id)
await message.edit(content=highscore_string)
return message
return
async def submit_score(