> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lukan.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord

> Connect Lukan to Discord via the Gateway API for messaging, voice notes, and pipeline approvals.

The Discord plugin connects Lukan to your Discord server using discord.js with Gateway WebSocket.

## Setup

### 1. Create a Discord App

1. Go to [discord.com/developers/applications](https://discord.com/developers/applications) and create a new application
2. In **Bot**, reset the token and copy it
3. Enable **Message Content Intent** in Privileged Gateway Intents
4. In **OAuth2 > URL Generator**, select scope `bot` with permissions `Send Messages` and `Read Message History`
5. Open the generated URL to invite the bot to your server

### 2. Configure in Lukan

```bash theme={null}
lukan plugin install discord
lukan dc config set botToken "YOUR_BOT_TOKEN"
lukan plugin start discord
```

## Configuration

| Field                  | Description                                             |
| ---------------------- | ------------------------------------------------------- |
| `botToken`             | Discord bot token                                       |
| `allowedChannels`      | Channel IDs where the bot responds (empty = everywhere) |
| `allowedUsers`         | User IDs allowed to interact (empty = all)              |
| `prefix`               | Command prefix filter                                   |
| `replyInThread`        | Create/reply in threads (default: true)                 |
| `enableVoice`          | Enable voice channel transcription                      |
| `transcriptionBackend` | `local` (whisper.cpp) or `openai`                       |

## Voice Notes

When `enableVoice` is enabled, the bot can join voice channels and transcribe meetings:

* `!notes start` — start recording in the current voice channel
* `!notes stop` — stop recording and generate a summary with action items

## Pipeline Approvals

Discord works as a notification channel for approval gates. You can use:

* **Channel ID** — sends to the channel
* **User ID** — sends a DM to the user

To find IDs: enable Developer Mode in Discord settings (Advanced), then right-click any channel or user and select **Copy ID**.
