Corrige la vérification du type de canal dans la fonction say_message pour utiliser discord.channel.DMChannel.

This commit is contained in:
GZod01 2024-12-15 17:15:13 +01:00
parent 5a4b2bbd56
commit 25d2a319ba

View file

@ -70,7 +70,7 @@ async def say_message(userid:int, guildid:int, shortname:str, message:str,channe
# print(short_name,full_name,perso_image) # print(short_name,full_name,perso_image)
webhook = None webhook = None
# print("ok2") # print("ok2")
if channel is discord.DMChannel: if channel is discord.channel.DMChannel:
await channel.send(f"**{full_name}({short_name})**: {message}") await channel.send(f"**{full_name}({short_name})**: {message}")
return return
if discord.utils.get(await channel.webhooks(),name=short_name) is None: if discord.utils.get(await channel.webhooks(),name=short_name) is None: