a
This commit is contained in:
parent
56d9272c12
commit
c676e9eee3
1 changed files with 8 additions and 0 deletions
|
@ -137,6 +137,14 @@ class PersoCommands(app_commands.Group):
|
||||||
for row in rows:
|
for row in rows:
|
||||||
embeds.append(await perso_embed(self.bot,row))
|
embeds.append(await perso_embed(self.bot,row))
|
||||||
await interaction.response.send_message("Liste des personnages\n",embeds=embeds,ephemeral=output_hidden)
|
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:
|
async def perso_embed(bot:GammaRPBot,perso_datas)->discord.embeds.Embed:
|
||||||
|
|
Loading…
Reference in a new issue