pmonks / futbot

A Discord bot that delivers football (soccer) information to Discord.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Post Dutch Referee quizzes

pmonks opened this issue · comments

Description of Problem:

When the Dutch Referee Blog posts a new quiz, I want a link to the quiz to be posted to the #training-and-resources channel, so that the community knows a new quiz has been posted and can participate in it.

Furthermore, I want the bot to add reactions to that link, representing the question #s that folks got wrong. That way anyone can see which question(s) caused widespread trouble, and we can have a prioritised discussion about them.

Potential Solutions:

The blog offers an RSS feed which is likely to be the most computer-readable source for this information. Note however that it includes all of the Dutch Referee Blog Posts, not just quizzes, so some filtering will need to be done (e.g. looking for the word "quiz" in each post's title).

To (continue to) avoid the need for the bot to store persistent state, the bot should check the feed once a day (since it gets restarted by Heroku every day), and look for a new quiz blog post in the feed in the last 24 hours. It should only perform this processing via a timed job at a specific time each day, to ensure it doesn't post a quiz more than once.

First cut of implementation of this in rev 34087e5.

Fixed in PR #103.