Move message map creation to highscores.py. Was a circular import.

This commit is contained in:
alwayscompiling
2022-07-28 10:41:10 -04:00
parent 64004329da
commit 463ef48052
3 changed files with 20 additions and 21 deletions
+7 -2
View File
@@ -10,7 +10,6 @@ from nextcord.ext import commands
import config
from utilities.highscores_data import HighscoresData
from utilities.utils import create_message_map
logger = logging.getLogger("nextcord")
logger.setLevel(logging.DEBUG)
@@ -20,7 +19,13 @@ logger.addHandler(handler)
highscores_data: HighscoresData = HighscoresData()
highscores_message_map = create_message_map(highscores_data)
highscores_message_map = {}
for guild in highscores_data.get_guilds():
highscores_message_map[guild] = {}
for table in highscores_data.get_table_names(guild):
message_id = highscores_data.get_table_message_id(guild, table)
highscores_message_map[guild][message_id] = table
submission_objects: dict = {}