diff --git a/perso_commands.py b/perso_commands.py index d33e08c..6f88abb 100644 --- a/perso_commands.py +++ b/perso_commands.py @@ -45,8 +45,8 @@ class PersoCommands(app_commands.Group): if " " in nom_court: await interaction.response.send_message("Le nom court ne doit pas contenir d'espaces",ephemeral=True) return - check_exist = await self.bot.db.execute("SELECT * FROM personnages WHERE nom_court=?",(nom_court)) - if await check_exist.fetchone() is not None: + check_exist = await self.bot.db.execute("SELECT * FROM personnages WHERE nom_court=?",nom_court) + if check_exist.rowcount>0 or await check_exist.fetchone() is not None: await interaction.response.send_message("Ce nom court est déjà utilisé",ephemeral=True) return histoire = story