This commit is contained in:
GZod01 2024-12-18 09:34:19 +01:00
parent 56d9272c12
commit c676e9eee3

View file

@ -138,6 +138,14 @@ class PersoCommands(app_commands.Group):
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:
embed = discord.Embed(title=perso_datas["nom_complet"],description=perso_datas["histoire"])