Message map has guild id as an int. Update submission view to use HighscoresData.

This commit is contained in:
alwayscompiling
2022-07-28 11:01:40 -04:00
parent 463ef48052
commit f136181216
5 changed files with 60 additions and 23 deletions
+4 -4
View File
@@ -78,9 +78,9 @@ async def send_highscore_message(
# get guild id from channel
# channel should come from the guild that is requesting this highscores message anyways.
# check if guild is in message map already
if not str(channel.guild.id) in highscores_message_map:
highscores_message_map[str(channel.guild.id)] = {}
highscores_message_map[str(channel.guild.id)][message_id] = boss_name
if not channel.guild.id in highscores_message_map:
highscores_message_map[channel.guild.id] = {}
highscores_message_map[channel.guild.id][message_id] = boss_name
return message
@@ -99,7 +99,7 @@ async def submit_score(
highscores_data.add_score(interaction.guild_id, boss_name, category, user, score)
# edit message
highscore_channel_id = highscores_data.get_guild_channel_id(interaction.guild_id)
highscore_channel_id = highscores_data.get_guild_highscores_channel(interaction.guild_id)
print(f"Editting message {highscore_channel_id}")
channel = interaction.guild.get_channel(highscore_channel_id)