Capture and search thoughts from Discord using slash commands — works on desktop, mobile, and web.
- Working Cerebro setup (Getting Started completed)
- Discord account (free)
DISCORD CAPTURE -- CREDENTIAL TRACKER
--------------------------------------
DISCORD APPLICATION
Application ID: ____________ <- Step 1
Public Key: ____________ <- Step 1
Bot Token: ____________ <- Step 1
--------------------------------------
- Go to the Discord Developer Portal
- Click New Application
- Name:
Cerebro - Click Create
On the General Information page, copy into your credential tracker:
- Application ID
- Public Key
- In the left sidebar, click Bot
- Click Reset Token (or Add Bot if prompted)
- Copy the Token — paste into your credential tracker as Bot Token
- Under Privileged Gateway Intents, leave all toggles OFF (not needed for slash commands)
From your Cerebro project directory:
supabase secrets set DISCORD_PUBLIC_KEY=your-public-key-from-step-1
supabase secrets set DISCORD_BOT_TOKEN=your-bot-token-from-step-1
OPENROUTER_API_KEY,SUPABASE_URL, andSUPABASE_SERVICE_ROLE_KEYshould already be set.
supabase functions new cerebro-discordCopy the contents of integrations/discord-capture/deno.json into supabase/functions/cerebro-discord/deno.json.
Copy the contents of integrations/discord-capture/index.ts into supabase/functions/cerebro-discord/index.ts.
Deploy:
supabase functions deploy cerebro-discord --no-verify-jwtYour function is now live at:
https://YOUR_PROJECT_REF.supabase.co/functions/v1/cerebro-discord
-
Go back to the Discord Developer Portal → your app
-
On General Information, find Interactions Endpoint URL
-
Paste your Edge Function URL:
https://YOUR_PROJECT_REF.supabase.co/functions/v1/cerebro-discord -
Click Save Changes
Discord will send a verification PING to your endpoint. If it saves successfully, your endpoint is working.
If verification fails, double-check that the function deployed and the
DISCORD_PUBLIC_KEYsecret is correct.
Run these commands in your terminal to register the /capture and /search commands with Discord. Replace YOUR_APPLICATION_ID and YOUR_BOT_TOKEN with values from your credential tracker.
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bot YOUR_BOT_TOKEN" \
-d '{
"name": "capture",
"description": "Capture a thought to your Cerebro brain",
"options": [
{
"name": "thought",
"description": "The thought to capture",
"type": 3,
"required": true
}
]
}' \
"https://discord.com/api/v10/applications/YOUR_APPLICATION_ID/commands"curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bot YOUR_BOT_TOKEN" \
-d '{
"name": "search",
"description": "Search your Cerebro thoughts by meaning",
"options": [
{
"name": "query",
"description": "What to search for",
"type": 3,
"required": true
}
]
}' \
"https://discord.com/api/v10/applications/YOUR_APPLICATION_ID/commands"Slash commands may take up to an hour to appear globally. For instant testing, register guild-specific commands by replacing
/commandswith/guilds/YOUR_GUILD_ID/commandsin the URLs above.
Build an invite URL using your Application ID:
https://discord.com/api/oauth2/authorize?client_id=YOUR_APPLICATION_ID&scope=applications.commands%20bot
- Open this URL in your browser
- Select the server to add Cerebro to
- Click Authorize
In any channel in your server (or a DM with the bot), type:
/capture thought:Sarah mentioned she's thinking about leaving her job to start a consulting business
You should see a "thinking..." indicator followed by a confirmation with extracted metadata.
/search query:career changes
You should get back matching thoughts ranked by semantic similarity.
Open Supabase Dashboard → Table Editor → thoughts. New rows should have metadata.source = "discord".
- Global commands take up to 1 hour to propagate. Use guild-specific registration for instant testing.
- Make sure the bot is invited to your server with the
applications.commandsscope.
- Check that
DISCORD_PUBLIC_KEYis set correctly (it's the hex string from General Information, not the bot token). - Verify the Edge Function is deployed: visit the URL in a browser — should return
{"status":"ok","service":"cerebro-discord"}.
- Check Supabase Edge Function logs for detailed error messages.
- Verify
OPENROUTER_API_KEYis set and has credits.
- The Edge Function must respond within 3 seconds. The deferred response pattern (type 5) handles this — if you see this error, the function may not be receiving requests at all. Check the interactions endpoint URL.
Before moving on, confirm all of these pass:
- Capture works —
/capture thought:test thoughtreturns a confirmation with extracted metadata (topics, type) - Search works —
/search query:testreturns matching results ranked by similarity - Supabase data — Table Editor →
thoughtsshows rows withmetadata.source="discord" - Edge Function health — visiting
https://YOUR_PROJECT_REF.supabase.co/functions/v1/cerebro-discordin a browser returns{"status":"ok","service":"cerebro-discord"}
If any check fails, see the Troubleshooting section above.
When you capture a thought that mentions a future date or time (e.g. /capture thought:call the dentist tomorrow at 2pm), Cerebro can automatically create calendar events on O365 and/or Google Calendar.
See Reminders Setup for configuration instructions.