Change embed color to str and set a default one

This commit is contained in:
Joakim Hellsén 2023-01-23 17:38:56 +01:00
commit 8016c57d75
No known key found for this signature in database
GPG key ID: C889E6DC5EDBB36D
3 changed files with 4 additions and 7 deletions

View file

@ -69,10 +69,6 @@ def create_embed_webhook(webhook_url: str, entry: Entry) -> DiscordWebhook:
discord_embed: DiscordEmbed = DiscordEmbed()
# Remove # from the color if it exists.
if type(custom_embed.color) is str and custom_embed.color.startswith("#"):
custom_embed.color = custom_embed.color[1:]
if custom_embed.title:
discord_embed.set_title(custom_embed.title)
if custom_embed.description: