From 307ef86493fe791a4cac9f4f7bbccca39d428621 Mon Sep 17 00:00:00 2001 From: alwayscompiling Date: Fri, 22 Jul 2022 21:22:17 -0400 Subject: [PATCH] Removed old usage of message map from file. --- cogs/submission/submission_views.py | 6 +----- highscores.py | 2 +- utilities/utils.py | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/cogs/submission/submission_views.py b/cogs/submission/submission_views.py index 76e46fd..f12d1c5 100644 --- a/cogs/submission/submission_views.py +++ b/cogs/submission/submission_views.py @@ -7,9 +7,9 @@ import nextcord from nextcord import Embed from nextcord.ext import commands -from utilities.data_storage import create_message_map # pylint: disable=import-error from highscores import highscores_data # pylint: disable=import-error from highscores import submission_objects # pylint: disable=import-error +from highscores import highscores_message_map # pylint: disable=import-error from .verification_view import VerificationView @@ -186,11 +186,7 @@ class SubmissionCreateButton(nextcord.ui.View): self, button: nextcord.ui.Button, interaction: nextcord.Interaction ): # pylint: disable=unused-argument """Button for score submission.""" - highscores_message_map = create_message_map() boss_name = highscores_message_map[str(interaction.message.id)] - # embed = nextcord.Embed(title="Highscores Submission") - # embed.add_field(name="Boss", value=boss_name, inline=False) - # embed.add_field(name="User", value=interaction.user.display_name, inline=False) channel = self._bot.get_channel(highscores_data["submission_channel_id"]) # a user should only have 1 submission active at once. diff --git a/highscores.py b/highscores.py index 8a770b0..9756db6 100644 --- a/highscores.py +++ b/highscores.py @@ -22,7 +22,7 @@ logger.addHandler(handler) highscores_config = open_highscores_config() highscores_data = open_highscores_data() -highscores_message_map = create_message_map() +highscores_message_map = create_message_map(highscores_data) submission_objects: dict = {} diff --git a/utilities/utils.py b/utilities/utils.py index 4eb1cb6..0c8428a 100644 --- a/utilities/utils.py +++ b/utilities/utils.py @@ -7,7 +7,6 @@ from highscores import highscores_config # pylint: disable=import-error from highscores import highscores_data # pylint: disable=import-error from highscores import highscores_message_map # pylint: disable=import-error from utilities.data_storage import save_highscores_data # pylint: disable=import-error -from utilities.data_storage import save_message_map # pylint: disable=import-error def format_highscore_message(boss_name: str): @@ -70,7 +69,6 @@ async def send_highscore_message(channel, boss_name: str) -> nextcord.Message: highscores_data[boss_name]["message_id"] = message_id # save message -> boss_name in message_map highscores_message_map[str(message_id)] = boss_name - save_message_map(highscores_message_map) return message