Corrige l'indentation dans la création de la table personnages et ajuste la fonction d'autocomplétion pour inclure le paramètre 'current'.

This commit is contained in:
GZod01 2024-12-16 13:18:54 +01:00
parent 9eb30bb00c
commit 1837078c73
2 changed files with 10 additions and 10 deletions

View file

@ -81,7 +81,7 @@ class PersoCommands(app_commands.Group):
embed = await perso_embed(self.bot,row) embed = await perso_embed(self.bot,row)
await interaction.response.send_message(f"Affichage de {row["nom_complet"]}({row["nom_court"]})",embed=embed) await interaction.response.send_message(f"Affichage de {row["nom_complet"]}({row["nom_court"]})",embed=embed)
@show_character.autocomplete(name="short_name") @show_character.autocomplete(name="short_name")
async def autocomplete_short_name(self,interaction:discord.Interaction): async def autocomplete_short_name(self,interaction:discord.Interaction,current:str):
res = await self.bot.db.execute("SELECT nom_court FROM personnages WHERE uuid=? AND (guild_id=? OR guild_id IS NULL)",(interaction.user.id,interaction.guild.id)) res = await self.bot.db.execute("SELECT nom_court FROM personnages WHERE uuid=? AND (guild_id=? OR guild_id IS NULL)",(interaction.user.id,interaction.guild.id))
rows = await res.fetchall() rows = await res.fetchall()
await res.close() await res.close()