From e5d93e9779e620fa471d35726baffc9be5a70b71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Wed, 25 Jan 2023 15:51:51 +0100 Subject: [PATCH] Fix crash when color was int --- discord_rss_bot/feeds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord_rss_bot/feeds.py b/discord_rss_bot/feeds.py index ee6d261..75cc7b0 100644 --- a/discord_rss_bot/feeds.py +++ b/discord_rss_bot/feeds.py @@ -73,7 +73,7 @@ def create_embed_webhook(webhook_url: str, entry: Entry) -> DiscordWebhook: discord_embed.set_title(custom_embed.title) if custom_embed.description: discord_embed.set_description(custom_embed.description) - if custom_embed.color and custom_embed.color.startswith("#"): + if custom_embed.color and type(custom_embed.color) == str and custom_embed.color.startswith("#"): 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: