This commit is contained in:
GZod01 2024-12-16 13:52:38 +01:00
parent 1df8eb24a4
commit 3bb40fc09f

View file

@ -97,7 +97,10 @@ class PersoCommands(app_commands.Group):
rows = await res.fetchall()
await res.close()
return [app_commands.OptionChoice(name=row["nom_court"],value=row["nom_court"]) for row in rows]
@app_commands.command(name="lister",description="Liste les personnages sur le serveur")
@app_commands.describe(output_hidden="Afficher les personnages de manière cachée")
async def list_characters(self,interaction:discord.Interaction,output_hidden:bool=True):
res = await self.bot.db.execute("SELECT * FROM personnages WHERE guild_id=? OR guild_id IS NULL",(interaction.guild.id,))
rows = await res.fetchall()