[RSS] URL is required param so let's have it that way in the signature (#196)

* [RSS] URL is required param so let's have it that way in the signature

* version

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
This commit is contained in:
jack1142
2021-01-08 18:24:40 +01:00
committed by GitHub
parent acb8756ec1
commit 76aaed32bc

View File

@@ -25,7 +25,7 @@ from .tag_type import INTERNAL_TAGS, VALID_IMAGES, TagType
log = logging.getLogger("red.aikaterna.rss")
__version__ = "1.3.3"
__version__ = "1.3.4"
class RSS(commands.Cog):
@@ -477,17 +477,12 @@ class RSS(commands.Cog):
pass
@rss.command(name="add")
async def _rss_add(self, ctx, feed_name: str, channel: Optional[discord.TextChannel] = None, url: str = None):
async def _rss_add(self, ctx, feed_name: str, channel: Optional[discord.TextChannel] = None, url: str):
"""
Add an RSS feed to a channel.
Defaults to the current channel if no channel is specified.
"""
no_url = "Invalid or unavailable URL."
if not url:
await ctx.send(no_url)
return
channel = channel or ctx.channel
channel_permission_check = await self._check_channel_permissions(ctx, channel)
if not channel_permission_check:
@@ -497,7 +492,7 @@ class RSS(commands.Cog):
if valid_url:
await self._add_feed(ctx, feed_name.lower(), channel, url)
else:
await ctx.send(no_url)
await ctx.send("Invalid or unavailable URL.")
@rss.group(name="embed")
async def _rss_embed(self, ctx):