a
This commit is contained in:
parent
f42b6ab3d0
commit
eee93e3ef5
1 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ class PersoCommands(app_commands.Group):
|
||||||
await res.close()
|
await res.close()
|
||||||
return [app_commands.OptionChoice(name=row["nom_court"],value=row["nom_court"]) for row in rows]
|
return [app_commands.OptionChoice(name=row["nom_court"],value=row["nom_court"]) for row in rows]
|
||||||
@app_commands.command(name="lister",description="Liste tous les personnages")
|
@app_commands.command(name="lister",description="Liste tous les personnages")
|
||||||
async def list_characters(self,interaction:discord.Interaction):
|
async def list_characters(self,interaction:discord.Interaction,output_hidden:bool=False):
|
||||||
#admin
|
#admin
|
||||||
if not interaction.user.id == self.bot.owner_id:
|
if not interaction.user.id == self.bot.owner_id:
|
||||||
await interaction.response.send_message("Vous n'avez pas la permission d'exécuter cette commande",ephemeral=True)
|
await interaction.response.send_message("Vous n'avez pas la permission d'exécuter cette commande",ephemeral=True)
|
||||||
|
@ -99,7 +99,7 @@ class PersoCommands(app_commands.Group):
|
||||||
embeds = []
|
embeds = []
|
||||||
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=True)
|
await interaction.response.send_message("Liste des personnages\n",embeds=embeds,ephemeral=output_hidden)
|
||||||
|
|
||||||
|
|
||||||
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