Message map has guild id as an int. Update submission view to use HighscoresData.
This commit is contained in:
+4
-4
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user