From fbe505d3c61d3b8af62f2f723d5a7a2e04c61ad3 Mon Sep 17 00:00:00 2001 From: aikaterna <20862007+aikaterna@users.noreply.github.com> Date: Tue, 26 Jan 2021 08:53:35 -0800 Subject: [PATCH] [RSS] Fix for tags + catch channel feed names --- rss/rss.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rss/rss.py b/rss/rss.py index 4f1eb23..75c6d5d 100644 --- a/rss/rss.py +++ b/rss/rss.py @@ -25,7 +25,7 @@ from .tag_type import INTERNAL_TAGS, VALID_IMAGES, TagType log = logging.getLogger("red.aikaterna.rss") -__version__ = "1.3.5" +__version__ = "1.3.6" class RSS(commands.Cog): @@ -144,7 +144,8 @@ class RSS(commands.Cog): except (KeyError, TypeError): pass - rss_object[f"{tag_name}_plaintext"] = self._add_generic_html_plaintext(soup) + if soup: + rss_object[f"{tag_name}_plaintext"] = self._add_generic_html_plaintext(soup) if tag_content_check == TagType.LIST: tags_list = [] @@ -483,6 +484,12 @@ class RSS(commands.Cog): Defaults to the current channel if no channel is specified. """ + if feed_name.startswith("<#"): + # someone typed a channel name but not a feed name + msg = "Try again with a feed name included in the right spot so that you can refer to the feed later.\n" + msg += f"Example: `{ctx.prefix}rss add feed_name channel_name feed_url`" + await ctx.send(msg) + return channel = channel or ctx.channel channel_permission_check = await self._check_channel_permissions(ctx, channel) if not channel_permission_check: