From 9338ffe8677969d30e7047ffbf18b7f67e602b94 Mon Sep 17 00:00:00 2001 From: GZod01 Date: Sun, 15 Dec 2024 16:09:47 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20l'acc=C3=A8s=20aux?= =?UTF-8?q?=20colonnes=20dans=20les=20requ=C3=AAtes=20de=20base=20de=20don?= =?UTF-8?q?n=C3=A9es=20pour=20utiliser=20des=20noms=20de=20colonnes=20expl?= =?UTF-8?q?icites?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main-bot.py | 6 +++--- perso_commands.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main-bot.py b/main-bot.py index dcefd60..f4b0573 100644 --- a/main-bot.py +++ b/main-bot.py @@ -53,9 +53,9 @@ async def say_message(userid:int, guildid:int, shortname:str, message:str,channe await res.close() if row is None: return False - short_name = row[0] - full_name = row[1] - perso_image = row[2] + short_name = row["nom_court"] + full_name = row["nom_complet"] + perso_image = row["image"] webhook = None if discord.utils.get(await channel.webhooks(),name=short_name) is None: webhook = await channel.create_webhook(name=short_name,avatar=perso_image) diff --git a/perso_commands.py b/perso_commands.py index 12ef2ed..6902870 100644 --- a/perso_commands.py +++ b/perso_commands.py @@ -75,6 +75,6 @@ class PersoCommands(app_commands.Group): message="" for row in rows: print(row) - message+=f"Nom court: {row[0]}\nNom complet: {row[1]}\nHistoire: {row[3]}\nPouvoirs: {row[4]}\nAge: {row[6]}\nSexe: {row[7]}\n\n" + message+=f"Nom court: {row["nom_court"]}\nNom complet: {row["nom_complet"]}\nHistoire: {row["histoire"]}\nPouvoirs: {row["pouvoirs"]}\nAge: {row["age"]}\nSexe: {row["sexe"]}\n\n" await interaction.response.send_message("Liste des personnages\n"+message,ephemeral=True) \ No newline at end of file