Messaging Platforms

Discord Bot

Deploy your AI agent as a Discord bot. Interact with users in Discord servers through text channels, direct messages, and voice channels. Supports slash commands and rich embeds.

Features

  • Discord bot integration
  • Text channel support
  • Direct messages
  • Slash commands
  • Rich embeds
  • Reactions
  • File attachments
  • Voice channel support (future)

Requirements

  • Discord Application
  • Bot token
  • Bot permissions
  • Webhook endpoint

Setup

  1. 1Create Discord Application
  2. 2Create bot user
  3. 3Get bot token
  4. 4Connect "Discord Bot" integration
  5. 5Enter bot token
  6. 6Configure permissions
  7. 7Invite bot to server
  8. 8Test bot commands

Authentication

Bot token authentication

Code Examples

JavaScript

// Discord.js bot example
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages] });

client.on('messageCreate', async message => {
  if (message.author.bot) return;
  
  // Forward to AI agent
  const response = await callAgent(message.content);
  await message.reply(response);
});

client.login('YOUR_BOT_TOKEN');