# Discord Bot

## Environment

Set these `.env` variables by visiting your [Discord Developer dashboard](https://discord.com/developers/applications/).

<table data-full-width="true"><thead><tr><th>Name</th></tr></thead><tbody><tr><td>DISCORD_APP</td></tr><tr><td>DISCORD_TOKEN</td></tr></tbody></table>

Simply enable the feature and configure as seen below:

```json
    "discord": {
        "surrounding_messages": 10, // number of msgs to reference
        "selection_rate": 1 // percentage of msgs to reply
    }
},
"enabled_clients": [
    "discord"
],
```

Run the below start command as always:

```shell
cargo run -- --character hunter.json
```

...add your bot to servers of choice and enjoy!

<figure><img src="/files/8zUKCQM3Eh0XdhsbVcDb" alt=""><figcaption><p>feel free to add ours <a href="https://discord.com/oauth2/authorize?client_id=1327156115007606874">here</a></p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fabelis.ai/agent/discord-bot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
