Fix test
This commit is contained in:
parent
8d56acdbd8
commit
b056a5a7bb
1 changed files with 3 additions and 2 deletions
|
|
@ -73,8 +73,9 @@ def create_embed_webhook(webhook_url: str, entry: Entry) -> DiscordWebhook:
|
||||||
discord_embed.set_title(custom_embed.title)
|
discord_embed.set_title(custom_embed.title)
|
||||||
if custom_embed.description:
|
if custom_embed.description:
|
||||||
discord_embed.set_description(custom_embed.description)
|
discord_embed.set_description(custom_embed.description)
|
||||||
if custom_embed.color:
|
if custom_embed.color and custom_embed.color.startswith("#"):
|
||||||
discord_embed.set_color(str(custom_embed.color))
|
custom_embed.color = custom_embed.color[1:]
|
||||||
|
discord_embed.set_color(int(custom_embed.color, 16))
|
||||||
if custom_embed.author_name and not custom_embed.author_url and not custom_embed.author_icon_url:
|
if custom_embed.author_name and not custom_embed.author_url and not custom_embed.author_icon_url:
|
||||||
discord_embed.set_author(name=custom_embed.author_name)
|
discord_embed.set_author(name=custom_embed.author_name)
|
||||||
if custom_embed.author_name and custom_embed.author_url and not custom_embed.author_icon_url:
|
if custom_embed.author_name and custom_embed.author_url and not custom_embed.author_icon_url:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue