News: Not all news start with news_

This commit is contained in:
Daniel Skýpala 2023-11-07 21:55:12 +01:00
parent 7cbdafe88c
commit 7e9e479e06

View file

@ -57,7 +57,7 @@ async def post_news(bot, guild, entry_id):
channel = get(guild.channels, id=news_json["news_channel"]) channel = get(guild.channels, id=news_json["news_channel"])
feed = await ksp_feed() 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: if len(entries_with_id) == 0:
return f"Entry with id ``{entry_id}`` not found." return f"Entry with id ``{entry_id}`` not found."