News: Not all news start with news_
This commit is contained in:
parent
7cbdafe88c
commit
7e9e479e06
1 changed files with 1 additions and 1 deletions
|
@ -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."
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue