---
updatedAt: 2025-01-29T14:36:26.000Z
agentTools:
  projectIndex: https://docs.helperai.ai/llms.txt
---

# Discord Loader

The `discord` loader is a HelperAI loader that allows you to load posts data form a discrod forum channel into the HelperAI Knowledge Base. Each post in the channel will be converted into a HelperAI Knowledge Base record.

## Loader Properties

| Property       | Type     | Description                                     |
| -------------- | -------- | ----------------------------------------------- |
| `channelId`    | `string` | The discord forum channel ID to load data from. |
| `discordToken` | `string` | Discord bot token.                              |

## Example

Before commencing this example operation, please ensure that you already have an existing Discord forum channel inside a a Discord server that can be managed by you.

### Enabling the Developer Mode

1. Click on the "User settings" button located at the bottom left of Discord.

<Image align="center" width="300px" src="https://files.readme.io/fa515be-Screen_Shot_2023-11-07_at_12.09.23_PM.png" />

2. In the side menu, select "Advanced."
3. Enable "Developer Mode" by checking the box.

<Image align="center" width="400px" src="https://files.readme.io/35c2faa-Screen_Shot_2023-11-07_at_2.22.10_PM.png" />

### Get Discord Forum Channel ID

1. Make sure you've already enabled developer mode.
2. Return to your Discord Server page and locate your forum channel. Right-click on this channel, and you will see the option "Copy Channel ID."

<Image align="center" width="300px" src="https://files.readme.io/cc67309-Screen_Shot_2023-11-07_at_12.19.09_PM.png" />

### Create a Discord Application and Get Discord Token

1. Goto the discord developer portal: <https://discord.com/developers/applications>
2. Click "New Application"
3. Enter the name of your application, for example: "HelperAI Loader"
4. Click the "Create" button. Your app will be created and you will be redirected to the app's page
5. In the app's page, click the "OAuth2" menu item on the left-side.
6. Copy the "Client ID", you will need this in the next step.
7. Use you browser to navigate to the link: `https://discord.com/api/oauth2/authorize?client_id={YOUR_CLIENT_ID}&permissions=1024&scope=bot%20applications.commands`. Make sure you replace the `{YOUR_CLIENT_ID}` with you client ID.
8. Select the server where your forum channel located at.

<Image align="center" width="300px" src="https://files.readme.io/45b2c67-Screen_Shot_2023-11-07_at_12.29.37_PM.png" />

9. Click "Continue" button. The application will be integrated into the selected server.
10. Return to the application page and click the "Bot" menu item:

<Image align="center" width="300px" src="https://files.readme.io/fa6eab4-Screen_Shot_2023-11-07_at_1.47.17_PM.png" />

11. If you didn't see a bot token string, click on the "Reset Token" button to generate one.

<Image align="center" width="500px" src="https://files.readme.io/df26999-Screen_Shot_2023-11-07_at_1.50.03_PM.png" />

> Now that you've collect the Channel ID and bot token, use them as the configuration property of knowledge base.