Browse Source

News: Not all news start with news_

mail
Daniel Skýpala 1 year ago
parent
commit
7e9e479e06
  1. 2
      hrochobot/cogs/news.py

2
hrochobot/cogs/news.py

@ -57,7 +57,7 @@ async def post_news(bot, guild, entry_id):
channel = get(guild.channels, id=news_json["news_channel"])
feed = await ksp_feed()
entries_with_id = list(filter(lambda e: e.id == f"https://ksp.mff.cuni.cz/news_{entry_id}", feed.entries))
entries_with_id = list(filter(lambda e: e.id == f"https://ksp.mff.cuni.cz/{entry_id}", feed.entries))
if len(entries_with_id) == 0:
return f"Entry with id ``{entry_id}`` not found."

Loading…
Cancel
Save