fix (statistics): Force cmds to wait for UI.

This commit is contained in:
2023-08-22 22:17:33 +03:00
parent f2fb3ce344
commit b5fad27c4f

View File

@@ -49,6 +49,7 @@ class StatsCog(LionCog):
await ctx.interaction.response.defer(thinking=True) await ctx.interaction.response.defer(thinking=True)
ui = ProfileUI(self.bot, ctx.author, ctx.guild) ui = ProfileUI(self.bot, ctx.author, ctx.guild)
await ui.run(ctx.interaction) await ui.run(ctx.interaction)
await ui.wait()
@cmds.hybrid_command( @cmds.hybrid_command(
name=_p('cmd:stats', "stats"), name=_p('cmd:stats', "stats"),
@@ -64,6 +65,7 @@ class StatsCog(LionCog):
await ctx.interaction.response.defer(thinking=True) await ctx.interaction.response.defer(thinking=True)
ui = WeeklyMonthlyUI(self.bot, ctx.author, ctx.guild) ui = WeeklyMonthlyUI(self.bot, ctx.author, ctx.guild)
await ui.run(ctx.interaction) await ui.run(ctx.interaction)
await ui.wait()
@cmds.hybrid_command( @cmds.hybrid_command(
name=_p('cmd:leaderboard', "leaderboard"), name=_p('cmd:leaderboard', "leaderboard"),
@@ -77,6 +79,7 @@ class StatsCog(LionCog):
await ctx.interaction.response.defer(thinking=True) await ctx.interaction.response.defer(thinking=True)
ui = LeaderboardUI(self.bot, ctx.author, ctx.guild) ui = LeaderboardUI(self.bot, ctx.author, ctx.guild)
await ui.run(ctx.interaction) await ui.run(ctx.interaction)
await ui.wait()
# Setting commands # Setting commands
@LionCog.placeholder_group @LionCog.placeholder_group