Save data after posting messages.
This commit is contained in:
@@ -45,6 +45,10 @@ class PostHighscores(commands.Cog, name="Post Highscores"):
|
|||||||
message: nextcord.Message = await send_highscore_message(channel, guild, table)
|
message: nextcord.Message = await send_highscore_message(channel, guild, table)
|
||||||
await message.edit(view=SubmissionCreateButton(self.bot))
|
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.
|
# This function will be called when this extension is loaded.
|
||||||
# It is necessary to add these functions to the bot.
|
# It is necessary to add these functions to the bot.
|
||||||
|
|||||||
Reference in New Issue
Block a user