-
-
Notifications
You must be signed in to change notification settings - Fork 110
Add a Joke Skill #318
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: master
Are you sure you want to change the base?
Add a Joke Skill #318
Conversation
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.
Code looks good to me, just need to refine the sentences, thanks!
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.
Actually, now that I think of it, these jokes are only in English. Maybe we could use another API that has multilanguage jokes? This one has a handful languages https://jokeapi.dev/, I couldn't find ones with more languages. Then the JokeInfo
should return isAvailable()==true
only if the language is supported by the API.
Makes an api call to https://v2.jokeapi.dev/joke/Any or if locale is "en": https://official-joke-api.appspot.com/random_joke Co-authored-by: Stypox <[email protected]>
I took care of that, and it is know calling that url. I enabled safe-mode by default, but am not sure if that needs to happen? Also, I found the jokes from the first api to be better, so I added an if block, to call the first api if the language is english, or the other one if that language is available. Other than that should be good to go. |
This skill makes an api call to https://official-joke-api.appspot.com.
Most of the jokes are bad puns. :)
Satisfies request 2 in #66.