Discord bot
The Discord bot lets you ingest images from Discord channels into Pindeck using emoji reactions, with a built-in moderation queue.Overview
The bot and media gateway are deployed from a separate repository (discord-bot). The Pindeck app consumes their services via Convex HTTP actions.
Setup
1. Create a Discord application
- Go to the Discord Developer Portal
- Create a new application and bot
- Note the Client ID and Bot Token
- Enable the Message Content Intent in the bot settings
2. Invite the bot to your server
Use the OAuth2 URL generator with thebot scope and permissions:
- Read Messages
- Read Message History
- Add Reactions
- Manage Messages (for moderation)
3. Configure environment variables
Set these in the Discord bot’s.env.local:
4. Run the bot
How ingest works
- A user adds a configured emoji reaction to a message with an image attachment
- The bot sends the image to Pindeck’s
/ingestExternalHTTP endpoint - Pindeck stores the image in RustFS, including preview/derivative URLs and five sampled colors
- Pindeck creates a record with
sourceType = "discord" - The image appears in the moderation queue
Moderation queue
New Discord-sourced images enter the moderation queue:- Images land in a pending state via the
/discordQueueendpoint - Moderators review and approve or reject via the
/discordModerateendpoint - Approved images move into the same
Review & Finalizedraft lane as local uploads - Draft Discord images use the same sampled colors, colored tags, metadata fields, and variation controls as local uploads
- Rejected images are removed
DISCORD_APPROVED_VARIATION_BUTTONS is enabled: Shot, Action, Coverage, B-Roll, Style, and Subtle.
Hosting
The Discord bot runs on a Hostinger VPS:- Hostname:
srv1353991 - Public IP:
187.77.8.227 - Tailscale IP:
100.105.199.93 - User:
root
API endpoints
See the API reference for full endpoint documentation.
Hostinger DNS note
The Hostinger bot container runs on the same public host that serves the Convex HTTP domains. If the container resolvesconvex-site.serving.cloud or convex.serving.cloud back to 127.0.1.1, Bun fetches fail with connection errors. The deployed Compose file pins those names to the Docker host gateway (172.18.0.1) using extra_hosts.