Discord

Run your CLI-JAW agent through a Discord bot. Send prompts, use slash commands, receive forwarded results, and handle file attachments -- all within your Discord server.

Setup

1. Create a Discord Bot

  1. Go to the Discord Developer Portal
  2. Create a new application and add a bot
  3. Enable the MESSAGE_CONTENT intent under Privileged Gateway Intents
  4. Copy the bot token
  5. Invite the bot to your server with appropriate permissions

2. Configure settings.json

{
  "discord": {
    "token": "YOUR_DISCORD_BOT_TOKEN",
    "guildId": "YOUR_GUILD_ID",
    "channelIds": ["CHANNEL_ID_1", "CHANNEL_ID_2"],
    "forwardAll": true
  }
}
The MESSAGE_CONTENT privileged intent is required. Without it, the bot cannot read message content in guild channels.

3. Alternative: Use jaw init

jaw init --channel discord \
  --discord-token "YOUR_TOKEN" \
  --discord-guild-id "GUILD_ID" \
  --discord-channel-ids "CHANNEL_ID_1,CHANNEL_ID_2"

Slash Commands

Discord slash commands are registered as guild-scoped commands. All 27 visible commands are available through Discord's native /command interface. The command execution uses getVisibleCommands('discord') and makeCommandCtx('discord', ...).

Slash command replies are deferred to avoid Discord's 3-second timeout on interaction responses.

Message Handling

Forwarding

When forwardAll is true, agent results are forwarded to the active Discord channel as chunked messages.

/forward on   # Enable forwarding
/forward off  # Disable forwarding

Channel Allow List

The channelIds array restricts which channels the bot listens in. Thread parents are checked against this list, so threads within allowed channels also work.

Environment Variables

DISCORD_TOKEN=your_token_here
DISCORD_GUILD_ID=123456789
DISCORD_CHANNEL_IDS=111222333,444555666

Send API

POST /api/discord/send    # Direct Discord send
POST /api/channel/send    # Unified channel send (preferred)
Try it:
  • 디스코드 봇 설정해줘
  • 디스코드로 알려줘