Removed old usage of message map from file.
This commit is contained in:
@@ -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.
|
||||
|
||||
+1
-1
@@ -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 = {}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user