EveCogs/rubylogging
root 3aeb656633 feat(rubylogging): add attachment re-upload to preserve deleted images permanently
**The Problem:**
Discord CDN URLs (even proxy URLs) expire after message deletion, so image
previews in logs would show as broken after a few minutes.

**The Solution:**
- New "reupload" feature (enabled by default) downloads and re-uploads attachments
- Deleted images/GIFs are permanently preserved in the log channel
- Works with aiohttp to download attachments asynchronously
- Attaches files directly to log message (up to 10 per message)

**Features:**
- `[p]rlog attachments reupload` - Toggle re-uploading on/off
- Downloads images when message is deleted
- Re-uploads as Discord Files (permanent storage)
- Falls back to URL embedding if download fails
- Shows status in settings display

**Improvements:**
- Use proxy URLs throughout for better persistence
- Pass cached attachments through message object
- Better file extension detection (.png, .jpg, .jpeg, .gif, .webp)
- Track ephemeral attachments
- Exception handling for download failures

**Trade-offs:**
- Uses bandwidth to download/upload
- Files become permanent in log channel
- Worth it for permanent image preservation!

Images and GIFs now remain visible in logs forever! 🖼️

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-05-22 22:11:49 +00:00
..
__init__.py rubylogging/__init__.py | 19 ++ 2026-05-22 21:04:03 +00:00
info.json feat: comprehensive audits + fixes for UserSlash & NewHelpMenu, new RubyLogging cog 2026-05-22 21:15:16 +00:00
rubylogging.py feat(rubylogging): add attachment re-upload to preserve deleted images permanently 2026-05-22 22:11:49 +00:00