-
-
Notifications
You must be signed in to change notification settings - Fork 255
Add .quote daily and .quote random command to retrieve quotes from zenquotes.io api #1707
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
base: main
Are you sure you want to change the base?
Conversation
…and the daily quote from the zenquotes.io api respectively
jb3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These commands should be in a group together (e.g. .quote random and .quote daily).
See review comments, but additionally:
- The API usage is metered, so you should cache the daily quote for a period instead of making frequent requests.
- The ZenQuotes license mandates that you provide attribution when you use quotes from their API on their free plan (see https://docs.zenquotes.io/zenquotes-documentation/#use-limits). We need to either do this or find an API that does not require attribution (use an embed if you decide to add attribution).
|
Thanks for the detailed review, I'll work on implementing these changes and push as soon as possible. |
jb3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks for making those changes, looks much cleaner than the original implementation. Also, nice work integrating Redis for the caching.
Few more feedback points below:
|
I have implemented these changes. |
jb3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The uv.lock changes can be reverted now as well since aiohttp is unpinned.
Relevant Issues
Closes #1706
Description
bot/utils/quote.pyfor API requests using bot's HTTP session..quote dailyand.quote randomcommands inbot/exts/fun/fun.pyto retrieve the daily quote and random quotes from zenquotes.io API respectively.Did you: