TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/remorses/kimaki/llms.txt
Use this file to discover all available pages before exploring further.
upload-to-discord command uploads local files to a Discord thread, making them available as context for the AI session.
Usage
Uploading files to a session
error.log and bug.png to the Discord thread mapped to session abc123.
Command options
OpenCode session ID. The command looks up the Discord thread associated with this session and uploads files there.
One or more file paths to upload. Supports any file type Discord accepts (images, text, PDFs, etc.).
Environment variables
Discord bot token. Required when running outside the bot process (e.g., in CI).
Supported file types
Kimaki uploads any file type Discord supports:- Images:
.png,.jpg,.jpeg,.gif,.webp,.heic - Text:
.txt,.md,.log,.json,.yaml,.toml - Code:
.js,.ts,.py,.go,.rs, etc. - Documents:
.pdf,.csv - Archives:
.zip,.tar.gz
Examples
Upload logs from CI
After a test failure, upload the log file to the session:.github/workflows/test.yml
Upload screenshot
Upload multiple files
Upload all logs in a directory
Behavior
- Session lookup: Queries the database to find the Discord thread for the session
- File reading: Reads each file from the filesystem
- Upload: Sends files to Discord via the REST API
- Processing: The AI session receives the files and can reference them
Files are uploaded to Discord immediately. The AI doesn’t automatically process them unless you send a follow-up message referencing the files.
File processing
Once uploaded, Kimaki processes files based on type:- Images: Resized to 2048x2048 max, converted to JPEG, included in AI vision context
- Text files: Content extracted and wrapped in XML with filename metadata
- Other files: Available for download but not processed by AI
Size limits
Discord has file size limits:- Standard servers: 25 MB per file
- Boosted servers: 50-500 MB depending on boost level
Use cases
Debugging with logs
Design review with screenshots
Configuration debugging
Troubleshooting
Error: Session not found
Error: Session not found
The session ID doesn’t exist in the database. Check the session ID with
/session-id in Discord or by inspecting the database.Error: Thread not found
Error: Thread not found
The Discord thread associated with the session no longer exists (possibly deleted). You can’t upload to deleted threads.
File too large
File too large
Discord rejected the file due to size limits. Compress images, split large files, or use external storage.
Upload succeeds but AI doesn't see files
Upload succeeds but AI doesn't see files
Send a follow-up message after uploading to prompt the AI to process the new files.