You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A command that will fetch information about a certain day (can be filtered by the year too) for AOC puzzles.
Reasoning
I've seen a lot of people including myself have trouble remembering what day had what. Especially with puzzles from past years when people didn't participate, you have to look up the day every time to see what happened on that day.
In addition, being able to pull up the day from Discord rather than exiting into your browser to search up the day every time is a lot easier to do.
Proposed Implementation
Every day after 12:00 AM if an AOC puzzle has been released, Sir Lancebot will scrape the contents of that day's webpage and store it in a Redis cache. That way when the user requests that certain day, the contents will already be in the cache. If the user requests a day that isn't in the cache, it will send a request to the webpage, scrape it, return the information the user wants and then cache it.
For example:
if the day is December 6th, 2021, when the AOC puzzle for Day 6 of 2021 is released, it will add it to the cache. That way when someone does .aoc day 6
it will display an embed with the title "Lanternfish" (the title of the day's challenge), with an excerpt from the page
If someone does .aoc day 2018 6
It wouldn't be in the cache yet so it fetches information on that day, returns what the day was about and then adds it to the cache.
Would you like to implement this yourself?
I'd like to implement this feature myself or with someone else
Anyone can implement this feature
The text was updated successfully, but these errors were encountered:
shtlrs
transferred this issue from python-discord/sir-lancebot
May 6, 2023
Description
A command that will fetch information about a certain day (can be filtered by the year too) for AOC puzzles.
Reasoning
I've seen a lot of people including myself have trouble remembering what day had what. Especially with puzzles from past years when people didn't participate, you have to look up the day every time to see what happened on that day.
In addition, being able to pull up the day from Discord rather than exiting into your browser to search up the day every time is a lot easier to do.
Proposed Implementation
Every day after 12:00 AM if an AOC puzzle has been released, Sir Lancebot will scrape the contents of that day's webpage and store it in a Redis cache. That way when the user requests that certain day, the contents will already be in the cache. If the user requests a day that isn't in the cache, it will send a request to the webpage, scrape it, return the information the user wants and then cache it.
For example:
if the day is December 6th, 2021, when the AOC puzzle for Day 6 of 2021 is released, it will add it to the cache. That way when someone does
.aoc day 6
it will display an embed with the title "Lanternfish" (the title of the day's challenge), with an excerpt from the page
If someone does
.aoc day 2018 6
It wouldn't be in the cache yet so it fetches information on that day, returns what the day was about and then adds it to the cache.
Would you like to implement this yourself?
The text was updated successfully, but these errors were encountered: