diff --git a/perso_commands.py b/perso_commands.py index 392a7f4..4691a23 100644 --- a/perso_commands.py +++ b/perso_commands.py @@ -137,6 +137,14 @@ class PersoCommands(app_commands.Group): for row in rows: embeds.append(await perso_embed(self.bot,row)) await interaction.response.send_message("Liste des personnages\n",embeds=embeds,ephemeral=output_hidden) + + @app_commands.command(name="lister_univers",description="Liste les univers") + async def list_univers(self,interaction:discord.Interaction): + res = await self.bot.db.execute("SELECT DISTINCT universe FROM personnages") + rows = await res.fetchall() + await res.close() + universes = [row["universe"] for row in rows] + await interaction.response.send_message("Liste des univers",ephemeral=True,embed=discord.Embed(title="Liste des univers",description="\n".join(universes))) async def perso_embed(bot:GammaRPBot,perso_datas)->discord.embeds.Embed: