Integrations

Discord Integration

Deploy your AI chatbot as a Discord bot to respond to messages and slash commands in your servers

The Discord integration allows you to deploy your AI chatbot directly into Discord servers, enabling users to interact with it through slash commands, @mentions, direct messages, and replies.

Key Features

  • Respond to slash commands with AI-powered answers
  • Respond to @mentions when users tag the bot in messages
  • Direct message support for private conversations
  • Reply detection for ongoing conversations
  • Customizable response tone (professional, friendly, casual, etc.)
  • Configurable response delays to batch multiple messages
  • Channel restrictions to limit where the bot responds
  • Thread-based replies for organized conversations
  • Works alongside your existing Discord server setup

Quick Setup

Create a Discord Application

  1. Go to the Discord Developer Portal
  2. Click New Application and give it a name
  3. Navigate to the Bot section in the left sidebar
  4. Click Add Bot if not already created
  5. Under Privileged Gateway Intents, enable:
    • Message Content Intent (required to read message content)
    • Server Members Intent (optional, for better user context)

Important: The Message Content Intent is a privileged intent. Without it enabled, your bot cannot read the content of messages (it will only see empty messages). Make sure to enable it in the Bot settings.

Get Your Bot Token

  1. In the Bot section, click Reset Token
  2. Copy the token (you'll need this in the next step)
  3. Keep this token secure - it grants full access to your bot

Never share your bot token publicly. It grants full control over your bot. If leaked, immediately reset it in the Developer Portal.

Connect in FutureBase

  1. Go to Integrations in your FutureBase dashboard
  2. Click Install on the Discord integration
  3. Click Connect Bot and paste your bot token
  4. Copy the Interactions Endpoint URL provided

Configure Interactions Endpoint (for Slash Commands)

  1. Go back to Discord Developer Portal
  2. Select your application
  3. Navigate to the General Information section
  4. Paste the Interactions Endpoint URL you copied earlier
  5. Discord will verify the endpoint - it should save successfully

Add Bot to Your Server

  1. In the Developer Portal, go to OAuth2 → URL Generator
  2. Select scopes: bot and applications.commands
  3. Select bot permissions:
    • Send Messages
    • Read Messages/View Channels
    • Read Message History
    • Use Slash Commands
    • Create Public Threads (if using thread replies)
  4. Copy the generated URL and open it in your browser
  5. Select the server you want to add the bot to

Register Slash Commands (Optional)

To use slash commands, you may need to register them. This typically happens automatically when you set up the interactions endpoint, but you can manually configure them in the Developer Portal under Interactions → Commands.

Configuration Options

Response Tone

Choose how your bot communicates:

ToneDescription
ProfessionalClear, direct, business-appropriate communication
FriendlyWarm and approachable with occasional emojis
SupportiveEmpathetic, understanding, acknowledges user frustrations
CasualRelaxed, conversational, like talking to a friend
FormalTraditional, polite, highly structured responses

Response Delay

Configure how long the bot waits before responding. A short delay (1-5 seconds) can help batch multiple messages together, while immediate responses feel more interactive.

Response Triggers

Control when your bot responds to messages:

  • Respond to DMs: Reply to direct messages sent to the bot
  • Respond to @mentions: Reply when the bot is @mentioned in a server
  • Respond to replies: Reply when users reply directly to bot messages

All three triggers are enabled by default.

Channel Restrictions

Optionally specify which channels the bot should respond in:

  • Leave empty to allow responses in all channels
  • Add specific channel IDs to limit where the bot can respond
  • DMs are always allowed regardless of this setting

Thread Replies

Enable Reply in thread to have the bot create a new thread from the user's message and respond there. This keeps conversations organized and prevents cluttering the main channel.

How It Works

Slash Commands

  1. User types a slash command (e.g., /ask How do I reset my password?)
  2. Discord sends an interaction to your configured endpoint
  3. AI generates a response using your knowledge base
  4. Response is sent back immediately

Message Responses (via Gateway)

  1. User mentions the bot, sends a DM, or replies to a bot message
  2. The Gateway worker detects the message and checks trigger settings
  3. If triggers match, the message is queued for processing
  4. AI generates a response and the bot replies

All conversations are stored and can be viewed in your dashboard under Conversations.

Security & Permissions

  • Bot tokens are encrypted at rest using AES-256-GCM
  • Webhook signatures are verified using Discord's Ed25519 signing
  • Minimal permissions - only request the permissions you need
  • Disconnect anytime from your dashboard

We recommend creating a dedicated Discord application for FutureBase rather than using an existing bot token.

Troubleshooting

Best Practices

  1. Create a dedicated application - Don't share bot tokens between services
  2. Limit permissions - Only request permissions the bot actually needs
  3. Test in a private server first - Verify everything works before deploying to production servers
  4. Monitor conversations - Review conversations in your dashboard to improve AI responses
  5. Update your knowledge base - Keep your content up to date for accurate responses

On this page