Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions fern/products/docs/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ navigation:
- page: Slack app
path: ./pages/ask-fern/slack-app.mdx
slug: slack-app
- page: Discord bot
path: ./pages/ask-fern/discord-bot.mdx
slug: discord-bot
- api: API reference
api-name: fai
paginated: true
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 116 additions & 0 deletions fern/products/docs/pages/ask-fern/discord-bot.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---
title: Ask Fern Discord bot
description: Enable your customers to get instant answers to product questions directly in Discord using Ask Fern's AI-powered documentation bot.
---

The Ask Fern Discord bot allows customers to ask questions about your products directly in Discord channels and receive AI-generated answers from your documentation database.

Fern stores all questions and answers from Discord interactions for [analytics purposes](/learn/docs/ai-features/ask-fern/features#analytics).

## Setup

Install the Ask Fern bot in your Discord server and configure it for your channels.

<Note>
To install Ask Fern in your Discord server, you must have **Manage Server** permissions. These are set in Server Settings > People > Roles.
</Note>

<Steps>
<Step title="Get your unique install link">

Use the [API Explorer](/learn/docs/ai-features/ask-fern/api-reference/discord/create-discord-integration) to get a unique Discord installation link for your organization.

You will need:
- Your Fern token
- Your domain without protocol or path (e.g., `website.com`, not `https://website.com/docs`)

You can alternatively use this cURL request:
```bash
curl -X POST "https://fai.buildwithfern.com/discord/install?domain=<YOUR_DOMAIN>" \
-H "Authorization: Bearer <YOUR_FERN_TOKEN>"
```

Follow the URL returned in the `integration_url` response field.

</Step>
<Step title="Add to your server">
You'll be redirected to Discord to authorize the Ask Fern bot. Select the server where you want to add Ask Fern and click **Authorize**.
<Frame>
<img src="assets/allow-discord-permissions.png" alt="Allow Ask Fern for Discord server"/>
</Frame>
</Step>
<Step title="Configure channels">

Once the bot is added to your server, use the `/configure` slash command in each channel where you want the bot to respond. Without this configuration, the bot will not respond to messages in that channel.
<Frame>
<img src="assets/set-config-discord.png" alt="Configure bot by channel in Discord"/>
</Frame>
</Step>
</Steps>

## Configuration

Customize the bot's behavior to match your workflow needs.

### Bot settings per channel

Use the `/configure` slash command in any channel to adjust the settings. This opens an interactive menu where you can configure:

| Setting | Description |
|---------|-------------|
| **Response mode** | Controls whether the bot responds only when directly mentioned with `@Ask Fern` (`mentions_only`) or automatically responds to questions while ignoring casual chat (`auto`). |
| **Help role** | Optionally select a role or user to tag when users click the "Ask for help" button on bot responses. |

After selecting your preferences, click **Save Configuration** to apply the changes.
<Frame>
<img src="assets/config-saved-discord.png" alt="Config set success message in Discord"/>
</Frame>
### Customize the bot name

You can rename the bot to match your brand (example: "YourCompanyName Support"):

<Note>
To rename your Bot, you must have **Change Nickname** permissions. These are set in Server Settings > People > Roles
</Note>
<Steps>
<Step>
Go to the Members List section at the top of the Discord server
<Frame>
<img src="assets/members-list-discord.png" alt="Discord members list"/>
</Frame>
</Step>
<Step>
Right click the AskFern bot and select "Change Nickname"
</Step>
<Step>
Enter your preferred bot name and click "Save"
</Step>
</Steps>
Now, users will see your custom bot name instead of the default "Ask Fern" name.

## Architecture

When a user asks Ask Fern a question in Discord, the bot receives the message and triggers Fern's servers to search your documentation database and retrieve relevant context. Using that context, Ask Fern generates a response and replies in a thread.

<Accordion title="Diagram">
```mermaid
sequenceDiagram
autonumber
participant U as User (Discord)
participant D as Discord Bot
participant F as Fern Servers
participant V as Documentation Database
participant A as Ask Fern

U->>D: Ask question to @Ask Fern
D->>F: Forward message to Fern servers
F->>F: Convert query to vector
F->>V: Search for relevant chunks
V->>F: Return matching documents
F->>A: Send query + context
A->>A: Generate response
A->>D: Return answer
D->>U: Reply in Discord thread
F->>F: Store question and answer for analytics
```
</Accordion>
4 changes: 0 additions & 4 deletions fern/products/docs/pages/ask-fern/slack-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ title: Ask Fern Slack app
description: Enable your customers to get instant answers to product questions directly in Slack using Ask Fern's AI-powered documentation bot.
---

<Info>
Ask Fern is also available for Discord. Contact support@buildwithfern.com for more information.
</Info>

The Ask Fern Slack app allows customers to ask questions about your products directly in Slack channels and receive AI-generated answers from your documentation database.

Fern stores all questions and answers from Slack interactions for [analytics purposes](/learn/docs/ai-features/ask-fern/features#analytics).
Expand Down