Creating message map entry if guild id isn't there already.

This commit is contained in:
alwayscompiling
2022-07-26 21:22:12 -04:00
parent 39c858af64
commit 7ba43ea4f4
+3
View File
@@ -75,6 +75,9 @@ async def send_highscore_message(
# save message -> boss_name in message_map # save message -> boss_name in message_map
# get guild id from channel # get guild id from channel
# channel should come from the guild that is requesting this highscores message anyways. # channel should come from the guild that is requesting this highscores message anyways.
# check if guild is in message map already
if not str(channel.guild.id) in highscores_message_map:
highscores_message_map[str(channel.guild.id)] = {}
highscores_message_map[str(channel.guild.id)][message_id] = boss_name highscores_message_map[str(channel.guild.id)][message_id] = boss_name
return message return message