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: