Skip to content

Commit

Permalink
minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
rtk-rnjn committed Sep 11, 2023
1 parent 898975a commit 21dd07b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cogs/rss/rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def prepare(self) -> None:
self.feed = await self.cog.check_feed(self.link)

async def send(self) -> None:
if not self.feed:
if getattr(self, "feed", None) is None:
await self.prepare()

if not self.feed.entries:
Expand Down Expand Up @@ -226,7 +226,7 @@ async def rss_list(self, ctx: Context):

@tasks.loop(hours=1)
async def rss_loop(self) -> None:
async for data in self.bot.guild_collections_ind.find():
async for data in self.bot.guild_collections_ind.find({"rss": {"$exists": True}}):
for feed in data["rss"]:
channel = self.bot.get_channel(feed["channel_id"])
if not channel:
Expand Down

0 comments on commit 21dd07b

Please sign in to comment.