Skip to content

Conversation

Tr-Do
Copy link

@Tr-Do Tr-Do commented Aug 13, 2025

Relevant Issues

https://github.com//issues/1691?notification_referrer_id=NT_kwDOBivkC7UxODE0MTkwMjE5MjoxMDM1Mzk3MjM#event-19124053085

Description

Changes made:

  • Extend the existing 'joke' command with 'dad' category using icanhazdadjoke API
  • Keep the existing joke categories (chuck, neutral, all)
    How it's implemented:
  • When dad joke is called, an asynchronous HTTP GET request is made to https://icanhazdadjoke.com with aiohttp
  • Implement user agent to comply with icanhazdadjoke API policy
  • The joke from JSON is sent back to the user with ctx.send()
  • Linted and tested in a new python file before adding the code to fun.py

Did you:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant