From e7d1f899f50443b600a524751dc3f217f4c35a22 Mon Sep 17 00:00:00 2001 From: GZod01 Date: Sun, 15 Dec 2024 16:12:32 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20messages=20de=20d=C3=A9bogage=20da?= =?UTF-8?q?ns=20la=20fonction=20say=5Fmessage=20pour=20faciliter=20le=20su?= =?UTF-8?q?ivi=20des=20param=C3=A8tres=20et=20du=20flux=20d'ex=C3=A9cution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main-bot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main-bot.py b/main-bot.py index ebb1527..0a5e8db 100644 --- a/main-bot.py +++ b/main-bot.py @@ -49,15 +49,18 @@ async def say(interaction:discord.Interaction,id:str,message:str): async def say_message(userid:int, guildid:int, shortname:str, message:str,channel:discord.TextChannel): print("HELLOWORODL") + print(userid,guildid,shortname,message,channel) res = await bot.db.execute("SELECT * FROM personnages WHERE uuid=? AND (guild_id=? OR guild_id IS NULL) AND nom_court=?",(userid,guildid,shortname)) row = await res.fetchone() await res.close() if row is None: return False + print("ok") short_name = row["nom_court"] full_name = row["nom_complet"] perso_image = row["image"] webhook = None + print("ok2") if discord.utils.get(await channel.webhooks(),name=short_name) is None: webhook = await channel.create_webhook(name=short_name,avatar=perso_image) else: