diff --git a/discord_rss_bot/custom_message.py b/discord_rss_bot/custom_message.py index 2ac5a84..7dde38a 100644 --- a/discord_rss_bot/custom_message.py +++ b/discord_rss_bot/custom_message.py @@ -12,7 +12,7 @@ from discord_rss_bot.settings import get_reader class CustomEmbed: title: str description: str - color: int + color: str author_name: str author_url: str author_icon_url: str @@ -290,7 +290,7 @@ def get_embed(custom_reader: Reader, feed: Feed) -> CustomEmbed: return CustomEmbed( title="", description="", - color=32896, + color="#469ad9", author_name="", author_url="", author_icon_url="", @@ -312,7 +312,7 @@ def get_embed_data(embed_data) -> CustomEmbed: """ title: str = embed_data.get("title", "") description: str = embed_data.get("description", "") - color: int = embed_data.get("color", 32896) + color: str = embed_data.get("color", "") author_name: str = embed_data.get("author_name", "") author_url: str = embed_data.get("author_url", "") author_icon_url: str = embed_data.get("author_icon_url", "") diff --git a/discord_rss_bot/feeds.py b/discord_rss_bot/feeds.py index 391ee0d..f433cbb 100644 --- a/discord_rss_bot/feeds.py +++ b/discord_rss_bot/feeds.py @@ -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: diff --git a/discord_rss_bot/settings.py b/discord_rss_bot/settings.py index f3d2754..592f6c1 100644 --- a/discord_rss_bot/settings.py +++ b/discord_rss_bot/settings.py @@ -13,6 +13,7 @@ default_custom_embed: dict[str, str] = { "title": "{{entry_title}}", "description": "{{entry_text}}", "image_url": "{{image_1}}", + "color": "#469ad9", }