Skip to content

Add dog command with random picture feature#347

Open
nekeal wants to merge 1 commit into
EuroPython:mainfrom
nekeal:add-random-dog-cog
Open

Add dog command with random picture feature#347
nekeal wants to merge 1 commit into
EuroPython:mainfrom
nekeal:add-random-dog-cog

Conversation

@nekeal
Copy link
Copy Markdown

@nekeal nekeal commented May 25, 2026

Summary

Add /dog hybrid command that fetches random dog pictures from dog.ceo (https://dog.ceo) API.

Changes

  • src/europython_discord/dog/dogclient.py — async HTTP client wrapping the Dog API, returns a random image URL or None on failure
  • src/europython_discord/dog/config.py — DogConfig model with configurable error messages
  • src/europython_discord/dog/cog.py — DogCog with /dog hybrid command; sends an embed on success or a random error message on failure
  • src/europython_discord/bot.py — registers DogCog with optional DogConfig
  • tests/dog/test_cog.py — unit tests for success and error paths
  • Config files — prod-config.toml and test-config.toml gain a [dog] section

Notes

  • Uses @commands.hybrid_command — works both as $dog prefix and /dog slash command

Resolves #341

image

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.

Random Dog Generator

1 participant