Discord Bot Integration
Connect your LVNG workspace to Discord to sync channels, enable AI-powered responses, and let your digital twins participate in Discord conversations.
Prerequisites
- An LVNG account with an API key
- A Discord application with a bot token (Discord Developer Portal)
- The bot added to your Discord server with
Send Messages,Read Message History, andView Channelspermissions
Step 1: Create Integration
Register your Discord bot as a platform integration in LVNG.
Create Discord integration
curl -X POST https://api.lvng.ai/api/v2/platform-integrations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "discord",
"name": "My Discord Bot",
"config": {
"bot_token": "YOUR_DISCORD_BOT_TOKEN",
"guild_id": "YOUR_GUILD_ID"
}
}'Step 2: Sync Channels
Import your Discord channels into LVNG. This creates matching LVNG channels linked to your Discord channels.
Sync Discord channels
curl -X POST https://api.lvng.ai/api/v2/platform-integrations/INT_ID/sync-channels \
-H "Authorization: Bearer YOUR_API_KEY"Step 3: Test Connection
Verify the integration is working correctly.
Test integration
curl -X POST https://api.lvng.ai/api/v2/platform-integrations/INT_ID/test \
-H "Authorization: Bearer YOUR_API_KEY"Webhook Setup (Optional)
For Discord Interactions (slash commands, buttons), set the interactions endpoint URL in your Discord application settings.
Webhook configuration
# Discord Interaction Endpoint URL:
# https://api.lvng.ai/webhooks/discord
#
# Set this in your Discord application settings under
# "Interactions Endpoint URL"
#
# The server verifies requests using Ed25519 signatures
# with your application's public key.Important: Discord does not support markdown tables in messages. LVNG automatically converts table-formatted responses to bullet lists for Discord.
How It Works
Once connected, the integration works as follows:
- Messages sent in synced Discord channels are ingested via the
/api/v2/ingestendpoint - LVNG processes the message through the AI routing system
- AI responses are sent back to the Discord channel via the bot
- Digital twins assigned to the channel can also participate in conversations
Next Steps
- Platform Integrations API — Full endpoint reference
- Digital Twins API — Add AI personas to your channels
- Agents API — Deploy autonomous agents