Adding map to track message id to boss.
This commit is contained in:
@@ -5,7 +5,9 @@ Contains various utlity functions for highscores bot
|
||||
import nextcord
|
||||
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):
|
||||
@@ -56,6 +58,10 @@ async def send_highscore_message(channel, boss_name: str):
|
||||
message_id = message.id
|
||||
highscores_data[boss_name]["message_id"] = message_id
|
||||
|
||||
# save message -> boss_name in message_map
|
||||
highscores_message_map[message_id] = boss_name
|
||||
save_message_map(highscores_message_map)
|
||||
|
||||
|
||||
async def submit_score(
|
||||
interaction: nextcord.Interaction, user: str, boss_name: str, category: str, score: str
|
||||
|
||||
Reference in New Issue
Block a user