Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.aoc day command #83

Open
1 of 2 tasks
Shom770 opened this issue Dec 19, 2021 · 0 comments
Open
1 of 2 tasks

.aoc day command #83

Shom770 opened this issue Dec 19, 2021 · 0 comments

Comments

@Shom770
Copy link

Shom770 commented Dec 19, 2021

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?

  • I'd like to implement this feature myself or with someone else
  • Anyone can implement this feature
@shtlrs shtlrs transferred this issue from python-discord/sir-lancebot May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants