Skip to content

feat: Add image upload support to Discord connector#61

Draft
4fthawaiian wants to merge 2 commits into
bevibing:mainfrom
4fthawaiian:feature/image-upload-support
Draft

feat: Add image upload support to Discord connector#61
4fthawaiian wants to merge 2 commits into
bevibing:mainfrom
4fthawaiian:feature/image-upload-support

Conversation

@4fthawaiian
Copy link
Copy Markdown

@4fthawaiian 4fthawaiian commented May 24, 2026

  • Detect image attachments (JPEG, PNG, GIF, WebP, SVG) in Discord messages
  • Add image context to prompts with filename, format, and size info
  • Support multiple images per message
  • Properly queue images when bot is busy
  • Add comprehensive test coverage for image handling
  • Follow existing voice message pattern for consistency

Fixes: Image attachments were previously ignored by the bot

Summary

Related Issue

Closes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)

Changes Made

Testing

  • I have tested this locally
  • I have added/updated tests (if applicable)
  • All existing tests pass (npm test)

Checklist

  • My code follows the existing code style
  • I have not included version bumps (maintainer handles versioning)
  • I have updated documentation if needed
  • This PR focuses on a single feature/fix

Screenshots (if applicable)

Additional Notes

- Detect image attachments (JPEG, PNG, GIF, WebP, SVG) in Discord messages
- Add image context to prompts with filename, format, and size info
- Support multiple images per message
- Properly queue images when bot is busy
- Add comprehensive test coverage for image handling
- Follow existing voice message pattern for consistency

Fixes: Image attachments were previously ignored by the bot
@4fthawaiian
Copy link
Copy Markdown
Author

vibe coded but tested

- Update ImageAttachment interface to allow null contentType
- Discord's attachment contentType can be null, so interface must match
- Build now passes successfully
}

// Process image attachments
if (imageAttachments.length > 0) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This only add image metadata like name, contentType, not the image itself, will be nice if we can pass image content in

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

good point - i'll keep updating this

@4fthawaiian 4fthawaiian marked this pull request as draft May 24, 2026 03:25
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