Move message map creation to highscores.py. Was a circular import.
This commit is contained in:
+7
-2
@@ -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 = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user