Skip to content

Comments

fix: send generated images as Discord file attachments#230

Merged
devth merged 1 commit intoyetibot:masterfrom
saada:fix/discord-image-attachments
Feb 13, 2026
Merged

fix: send generated images as Discord file attachments#230
devth merged 1 commit intoyetibot:masterfrom
saada:fix/discord-image-attachments

Conversation

@saada
Copy link
Contributor

@saada saada commented Feb 13, 2026

Summary

  • Generated images from !banana and !bameme were sent as localhost URLs that Discord can't resolve, so images never rendered
  • Intercept generated-image URLs in the Discord adapter's send-msg, decode the base64 data from the in-memory image-store, and send as a file attachment via discljord's :stream parameter
  • Discord automatically renders attached images inline — no changes needed to commands, handler pipeline, or other adapters

Test plan

  • Run !banana a cat in Discord and confirm the image renders inline
  • Run !bameme drake: tests / prod and confirm the image renders inline
  • Send a normal text command (e.g. !echo hello) and confirm it still works
  • Verify Slack/web adapters are unaffected (they continue using the URL approach)

Generated images from !banana and !bameme were sent as localhost URLs
that Discord can't resolve. Instead, decode the base64 image data
already in memory and send it as a file attachment via discljord's
:stream parameter, which renders inline in Discord.
@saada saada requested a review from devth as a code owner February 13, 2026 23:41
Copy link
Member

@devth devth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏🏻 🫡

@devth devth merged commit accac38 into yetibot:master Feb 13, 2026
1 check passed
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.

2 participants