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

# Connect Discord

> Add your hellenicAI Assistant to a Discord server — create a bot, enable the required intents, invite it, connect the token, and complete the one-time pairing step.

Connecting Discord lets your team interact with your AI assistant directly inside your Discord server.

This takes about 10 minutes and requires a Discord account with permission to manage your server.

## Step 1: Create a Discord application

<Steps>
  <Step title="Open the Discord Developer Portal">
    Go to [discord.com/developers/applications](https://discord.com/developers/applications) and log in with your Discord account.
  </Step>

  <Step title="Create a new application">
    Click **New Application** in the top-right corner. Give your application a name (for example `Hellenic Assistant`) and click **Create**.
  </Step>
</Steps>

## Step 2: Configure the bot and enable intents

<Steps>
  <Step title="Go to the Bot section">
    In the left sidebar, click **Bot**.
  </Step>

  <Step title="Enable Privileged Gateway Intents">
    Scroll down to **Privileged Gateway Intents** and enable all three:

    * **Message Content Intent** — required. Without this the bot connects but cannot read any messages.
    * **Server Members Intent** — recommended. Needed for user allowlists and name matching.
    * **Presence Intent** — optional.

    Click **Save Changes**.

    <Warning>
      Message Content Intent is mandatory. If it is not enabled, your bot will appear online but will not respond to anything.
    </Warning>
  </Step>

  <Step title="Copy the bot token">
    Still on the Bot page, click **Reset Token**, then copy the token that appears.

    <Warning>
      Keep your bot token private. Anyone with the token can control your bot and read all messages it can see. Never share it publicly or commit it to a code repository. If it is ever compromised, reset it immediately in the Developer Portal.
    </Warning>
  </Step>
</Steps>

## Step 3: Invite the bot to your server

<Steps>
  <Step title="Go to OAuth2 URL Generator">
    In the left sidebar, click **OAuth2**, then click **URL Generator**.
  </Step>

  <Step title="Select scopes">
    Under **Scopes**, check both:

    * `bot`
    * `applications.commands`
  </Step>

  <Step title="Select bot permissions">
    Under **Bot Permissions**, check:

    * View Channels
    * Send Messages
    * Read Message History
    * Embed Links
    * Attach Files
  </Step>

  <Step title="Copy and open the invite URL">
    Scroll down and copy the generated URL. Open it in your browser.
  </Step>

  <Step title="Select your server">
    Select the server you want to add the bot to from the dropdown, then click **Continue** and **Authorise**.

    Your bot will now appear in your server member list.
  </Step>
</Steps>

## Step 4: Connect to hellenicAI Assistants

<Steps>
  <Step title="Go to your instance dashboard">
    Log in at [app.hellenicai.com](https://app.hellenicai.com) and open your instance.
  </Step>

  <Step title="Open the Channels section">
    Scroll down to the **Channels** section on your instance page.
  </Step>

  <Step title="Paste your bot token">
    Find the Discord card, paste the token you copied from the Developer Portal, then click **Connect**.

    The status will change to **Not paired** and a Step 2 panel will appear.
  </Step>
</Steps>

## Step 5: Pair your Discord account

After connecting the token, you need to pair your personal Discord account. This is a one-time step that authorises your user to interact with the assistant.

<Steps>
  <Step title="DM your bot in Discord">
    Open Discord, find your bot in the member list, right-click it, and click **Message**. Send any message — for example `hello` or `/pair`.

    The bot will reply with a message like this:

    ```
    OpenClaw: access not configured.

    Your Discord user id: 123456789012345678
    Pairing code: GC5CC9FK

    Ask the bot owner to approve with:
    openclaw pairing approve discord GC5CC9FK
    ```

    Copy the 8-character pairing code.

    <Info>
      Pairing must be done via a **Direct Message** to the bot, not in a server channel. Once paired, the bot will respond to you in any channel it has access to.
    </Info>
  </Step>

  <Step title="Paste the code in your dashboard">
    Back in the hellenicAI Assistants dashboard, paste the pairing code into the Step 2 input and click **Approve**.
  </Step>

  <Step title="Confirm pairing">
    The status badge will change to **Paired**. Your assistant will now respond to your messages in Discord.
  </Step>
</Steps>

<Info>
  Each team member who wants to chat with the assistant needs to complete this pairing step once. If you need to link a different account, click **Re-pair** next to the Paired badge and repeat the process.
</Info>

## Step 6: Test the connection

<Steps>
  <Step title="Send a message in a server channel">
    Go to any channel in your Discord server that the bot has access to and send a message. No @mention is required — the bot responds to all messages in permitted channels.
  </Step>

  <Step title="Check the reply">
    Your AI assistant should reply within a few seconds. If it does, the connection is working correctly.
  </Step>
</Steps>

## Troubleshooting

| Problem                                      | Solution                                                                                                                                                        |
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Bot does not respond to anything             | **Message Content Intent** is likely not enabled. Go to the Developer Portal → Bot → Privileged Gateway Intents → enable Message Content Intent → Save Changes  |
| Bot says "This channel is not allowed"       | This appears in server channels before pairing is complete. Send a DM to the bot first to receive the pairing code, complete Step 5, then try the channel again |
| Bot appears offline after connecting token   | The token may be incorrect. Go to the Developer Portal, reset the token, and save it again in the Channels section                                              |
| Pairing code not received                    | Make sure you are sending the DM to the bot directly (not in a server channel). Right-click the bot user and click Message                                      |
| Pairing code is rejected                     | The code may have expired or already been used. Send a new DM to get a fresh code and paste it immediately                                                      |
| Status shows "Not paired"                    | Complete Step 5 above to approve your Discord account                                                                                                           |
| "Missing Access" error                       | Re-invite the bot using the OAuth2 URL Generator with the correct scopes (`bot` and `applications.commands`) and permissions                                    |
| Bot responds in some channels but not others | Check that the bot role has View Channels and Send Messages permissions in that specific channel, not just server-wide                                          |
| Token save shows "Connection refused"        | Your instance may be restarting. Wait 30 seconds and try again                                                                                                  |

Need more help? Email [support@hellenicai.com](mailto:support@hellenicai.com).
