From 1297d2d8dc8b0438a1a9da8afb35b2cec8d0b4d7 Mon Sep 17 00:00:00 2001 From: Sushi-Mampfer <84100259+Sushi-Mampfer@users.noreply.github.com> Date: Sat, 5 Oct 2024 12:56:15 +0200 Subject: [PATCH 1/2] Update leaderboard.py Defering the response to let the bot load the file and read it. --- cogs/leaderboard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cogs/leaderboard.py b/cogs/leaderboard.py index 7369d1c..4712c6f 100644 --- a/cogs/leaderboard.py +++ b/cogs/leaderboard.py @@ -19,6 +19,7 @@ async def on_ready(self): @nextcord.slash_command(name="leaderboard", description="Frong leaderboard") async def leaderboard(self, interaction: nextcord.Interaction): + await interaction.response.defer() csv_dict = {} data = "" total = 0 @@ -49,4 +50,4 @@ async def leaderboard(self, interaction: nextcord.Interaction): await interaction.response.send_message(embed=embed, ephemeral=False) def setup(bot): - bot.add_cog(Leaderboard(bot)) \ No newline at end of file + bot.add_cog(Leaderboard(bot)) From f6f3acfb7364a32359013ca93328282af85604c5 Mon Sep 17 00:00:00 2001 From: Soulsender Date: Wed, 23 Oct 2024 14:45:06 -0700 Subject: [PATCH 2/2] Update leaderboard.py --- cogs/leaderboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/leaderboard.py b/cogs/leaderboard.py index 4712c6f..6c1d9a8 100644 --- a/cogs/leaderboard.py +++ b/cogs/leaderboard.py @@ -47,7 +47,7 @@ async def leaderboard(self, interaction: nextcord.Interaction): embed = nextcord.Embed(title=":crown: **LEADERBOARD**", color=0xd6b509) embed.add_field(name=":speech_balloon: __FRONGS BY USER__", value=data,inline=False) embed.add_field(name=":loudspeaker: __TOTAL FRONGS__", value=total,inline=False) - await interaction.response.send_message(embed=embed, ephemeral=False) + await interaction.followup.send(embed=embed, ephemeral=False) def setup(bot): bot.add_cog(Leaderboard(bot))