Correction de l'utilisation de la méthode pour récupérer les webhooks dans la fonction say_message
This commit is contained in:
parent
cc0b18db7a
commit
f2255dfac6
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue