From b4d0f8a15e6eec801ca290dd29307da63c712319 Mon Sep 17 00:00:00 2001 From: alwayscompiling Date: Thu, 4 Aug 2022 11:22:50 -0400 Subject: [PATCH] Save data after posting messages. --- cogs/post_highscores/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cogs/post_highscores/__init__.py b/cogs/post_highscores/__init__.py index a6ba967..5d4ac24 100644 --- a/cogs/post_highscores/__init__.py +++ b/cogs/post_highscores/__init__.py @@ -45,6 +45,10 @@ class PostHighscores(commands.Cog, name="Post Highscores"): message: nextcord.Message = await send_highscore_message(channel, guild, table) await message.edit(view=SubmissionCreateButton(self.bot)) + # have to save data here in case message id was changed. rather save here after all + # all messages have been sent. + highscores_data.save_guild_data(ctx.guild.id) + # This function will be called when this extension is loaded. # It is necessary to add these functions to the bot.