Correction du nom de paramètre dans la commande 'lister_tout' pour une cohérence dans le code
This commit is contained in:
parent
c676e9eee3
commit
c39109476b
1 changed files with 3 additions and 3 deletions
|
@ -120,15 +120,15 @@ class PersoCommands(app_commands.Group):
|
||||||
|
|
||||||
@app_commands.command(name="lister_tout",description="Liste tous les personnages")
|
@app_commands.command(name="lister_tout",description="Liste tous les personnages")
|
||||||
@app_commands.describe(universe_code="Le code de l'univers duquel afficher les personnages",output_hidden="Afficher les personnages de manière cachée")
|
@app_commands.describe(universe_code="Le code de l'univers duquel afficher les personnages",output_hidden="Afficher les personnages de manière cachée")
|
||||||
async def list_all_characters(self,interaction:discord.Interaction,univers_code:str="",output_hidden:bool=True):
|
async def list_all_characters(self,interaction:discord.Interaction,universe_code:str="",output_hidden:bool=True):
|
||||||
#admin
|
#admin
|
||||||
if interaction.user.id !=super_owner_id:
|
if interaction.user.id !=super_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)
|
||||||
return
|
return
|
||||||
print("perso list")
|
print("perso list")
|
||||||
res=None
|
res=None
|
||||||
if univers_code!="":
|
if universe_code!="":
|
||||||
res = await self.bot.db.execute("SELECT * FROM personnages WHERE universe=?", (univers_code,))
|
res = await self.bot.db.execute("SELECT * FROM personnages WHERE universe=?", (universe_code,))
|
||||||
else:
|
else:
|
||||||
res = await self.bot.db.execute("SELECT * FROM personnages")
|
res = await self.bot.db.execute("SELECT * FROM personnages")
|
||||||
rows = await res.fetchall()
|
rows = await res.fetchall()
|
||||||
|
|
Loading…
Reference in a new issue