Keep /bunny working without Reddit API dependency #585
Labels
No labels
blocked
duplicate
needs
approval
needs
criteria
needs
estimate
needs
tests
question
step
doing
step
review
step
testing
step
todo
step
uat
type
admin
type
alert
type
bug
type
change
type
defect
type
dependencies
type
epic
type
idea
type
incident
type
investigation
type
spike
type
story
won't fix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
RabbitLabs/vylbot-app#585
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Epic:
Story Points:
The
/bunnycommand depends onrandom-bunny, which fetches anonymous Reddit JSON (https://reddit.com/r/{subreddit}/{sort}.json). Reddit is restricting that access, so the command is becoming unreliable.Goal: keep
/bunnyreturning a random rabbit image without relying on Reddit’s public/unauthenticated API.Current behaviour
src/commands/bunny.tspicks a subreddit (rabbits,bunnieswithhats,buncomfortable,bunnytongues,dutchbunnymafia), callsrandomBunny(subreddit, 'hot'), downloads the image, and embeds title / permalink / upvotes.random-bunny(RabbitLabs package) has no OAuth; it only hits Reddit’s.jsonendpoints.Options considered
GET /api/random) or bnuy-api. Replacerandom-bunnyin the bot. Loses subreddit metadata; depends on third-party uptime/catalog.random-bunny(stopgap) — keep the same UX (subreddits, titles, scores) via authenticated Reddit API. Still Reddit-dependent (keys, rate limits, policy risk).Recommendation from discussion: prefer option 1 or 2 for vylbot; treat OAuth in
random-bunnyas a delay, not a permanent fix. The command mainly needs a downloadable image URL.Acceptance Criteria
GIVEN the bot is running without Reddit credentials or anonymous Reddit JSON access
WHEN a user runs
/bunnyTHEN they receive an embed with a rabbit/bunny image
AND the command does not call Reddit’s unauthenticated
.jsonendpointsGIVEN the image source is temporarily unavailable
WHEN a user runs
/bunnyTHEN the command fails gracefully with a clear error reply (no unhandled exception)
GIVEN a chosen non-Reddit source is adopted
WHEN the change is merged
THEN
random-bunnyis removed from vylbot-app dependencies if no longer usedAND tests for the bunny command are updated for the new source
Subtasks
src/commands/bunny.tsto use the chosen sourcerandom-bunnydependency as appropriaterandom-bunnyinstead: track work in that repo and bump the package hereNotes
random-bunny@ RabbitLabs (also mirrored on Codeberg/npm)Option 1 source recommendation
For a hosted third-party API (option 1), prefer Rabbit API over bnuy-api.
Rabbit API (recommended for option 1)
GET https://rabbit-api-two.vercel.app/api/randombreed,url,urlId) fits Discord embeds wellbnuy-api (not preferred as the hosted default)
GET https://bnuy-api.scrunkly.cat/randomcompose.yml+ MariaDB) — better fit if we move to option 2source/original_urlfor attributionDecision summary
Caveat: if Rabbit API disappears later, fall back to self-hosting (option 2).