Added a MediaUploadService option to the configuration loader and documented it in the README so operators can pick the attachment backend (defaulting to Litterbox) straight from .env.
Refactored the Discord bridge to build a media service during initialization, route attachment uploads through it, and dynamically label the status embeds and error diagnostics based on the selected provider while preserving the existing progress messaging flow. Introduced a new media package that defines the uploader interface and ships a Litterbox implementation responsible for fetching Discord attachments and posting them to Catbox while reporting HTTP status codes back to the bridge.
This commit is contained in:
@@ -7,6 +7,7 @@ A high-performance bridge written in Go that synchronizes messages between Kiwi
|
||||
- ✅ Bidirectional message sync (Sneedchat ↔ Discord)
|
||||
- ✅ Edit and delete synchronization
|
||||
- ✅ Attachment uploads and BBcode formating via Litterbox
|
||||
- ✅ Pluggable media upload services (Litterbox by default)
|
||||
- ✅ BBCode → Markdown parsing
|
||||
- ✅ Message queueing during outages
|
||||
|
||||
@@ -135,6 +136,7 @@ Create separate systemd services with unique names
|
||||
**Important Notes:**
|
||||
- Replace `BRIDGE_USERNAME` with your **Kiwi Farms username** (not email)
|
||||
- `SNEEDCHAT_ROOM_ID=1` is the default Sneedchat room
|
||||
- `MEDIA_UPLOAD_SERVICE` selects the attachment backend (currently only `litterbox`)
|
||||
- Keep quotes out of values
|
||||
- Don't share your `.env` file!
|
||||
|
||||
@@ -162,6 +164,9 @@ BRIDGE_USER_ID=12345
|
||||
# Your Discord user ID (right-click yourself → Copy User ID)
|
||||
DISCORD_PING_USER_ID=1234567890123456789
|
||||
|
||||
# Media upload backend (defaults to litterbox if unset)
|
||||
MEDIA_UPLOAD_SERVICE=litterbox
|
||||
|
||||
# Optional: Enable file logging
|
||||
ENABLE_FILE_LOGGING=false
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user