From f2255dfac674cd942367ab9dc412cccb596be188 Mon Sep 17 00:00:00 2001 From: GZod01 Date: Sun, 15 Dec 2024 15:57:37 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20de=20l'utilisation=20de=20la=20m?= =?UTF-8?q?=C3=A9thode=20pour=20r=C3=A9cup=C3=A9rer=20les=20webhooks=20dan?= =?UTF-8?q?s=20la=20fonction=20say=5Fmessage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main-bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main-bot.py b/main-bot.py index e1415f0..c33bb72 100644 --- a/main-bot.py +++ b/main-bot.py @@ -54,10 +54,10 @@ async def say_message(userid:int, guildid:int, shortname:str, message:str,channe full_name = row[1] perso_image = row[2] webhook = None - if discord.utils.get(channel.webhooks(),name=short_name) is None: + if await discord.utils.get(await channel.webhooks(),name=short_name) is None: webhook = await channel.create_webhook(name=short_name,avatar=perso_image) else: - webhook = discord.utils.get(channel.webhooks(),name=short_name) + webhook = await discord.utils.get(await channel.webhooks(),name=short_name) await webhook.send(message,username=full_name,avatar_url=perso_image) return True