[RSS] Try for an image instead of assume
This commit is contained in:
@@ -25,7 +25,7 @@ from .tag_type import INTERNAL_TAGS, VALID_IMAGES, TagType
|
||||
log = logging.getLogger("red.aikaterna.rss")
|
||||
|
||||
|
||||
__version__ = "1.1.19"
|
||||
__version__ = "1.1.20"
|
||||
|
||||
|
||||
class RSS(commands.Cog):
|
||||
@@ -58,8 +58,11 @@ class RSS(commands.Cog):
|
||||
if content_images:
|
||||
for i, image in enumerate(content_images):
|
||||
tag_name = f"content_image{str(i + 1).zfill(2)}"
|
||||
rss_object[tag_name] = image["src"]
|
||||
rss_object["is_special"].append(tag_name)
|
||||
try:
|
||||
rss_object[tag_name] = image["src"]
|
||||
rss_object["is_special"].append(tag_name)
|
||||
except KeyError:
|
||||
pass
|
||||
return rss_object
|
||||
|
||||
async def _add_feed(self, ctx, feed_name: str, channel: discord.TextChannel, url: str):
|
||||
|
||||
Reference in New Issue
Block a user