a
This commit is contained in:
parent
b441eb504d
commit
b05baaea2d
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]
|
full_name = row[1]
|
||||||
perso_image = row[2]
|
perso_image = row[2]
|
||||||
webhook = None
|
webhook = None
|
||||||
if await discord.utils.get(await channel.webhooks(),name=short_name) is None:
|
if discord.utils.get(await channel.webhooks(),name=short_name) is None:
|
||||||
webhook = await channel.create_webhook(name=short_name,avatar=perso_image)
|
webhook = await channel.create_webhook(name=short_name,avatar=perso_image)
|
||||||
else:
|
else:
|
||||||
webhook = await discord.utils.get(await channel.webhooks(),name=short_name)
|
webhook = discord.utils.get(await channel.webhooks(),name=short_name)
|
||||||
await webhook.send(message,username=full_name,avatar_url=perso_image)
|
await webhook.send(message,username=full_name,avatar_url=perso_image)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue