> For the complete documentation index, see [llms.txt](https://acoservice.gitbook.io/acoservice-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://acoservice.gitbook.io/acoservice-documentation/running-your-aco/your-bot.md).

# Your bot

Your ACO runs its own Discord bot, under your own name.

Every ACO runs **its own Discord bot**, as its own Discord application, under its own name and avatar. Your members see your bot in your server — never ACO Service's.

That is why setup asks for your own Discord application rather than adding a shared bot: a shared one would appear in your server under someone else's name.

## What you need

From the [Discord Developer Portal](https://discord.com/developers/applications), for your own application:

|                   | What it does                                                                 |
| ----------------- | ---------------------------------------------------------------------------- |
| **Client ID**     | Identifies your app. Public.                                                 |
| **Client secret** | Lets members **sign in** to your site with Discord.                          |
| **Bot token**     | What the bot process **logs in to Discord** with. Makes slash commands work. |

{% hint style="warning" %}
**The client secret and the bot token are different credentials and are not interchangeable.** Supplying only the client secret gives you a perfectly working login and **zero slash commands**, because nothing is running your bot. This is the single most common setup mistake, and the symptom — sign-in works, bot is absent — does not look like a missing token.
{% endhint %}

Full walkthrough: [Your Discord application](/acoservice-documentation/setting-up-your-tenant/discord-application.md).

## Getting it running

Once your token is saved, ask for the bot in the console. Your request is **queued**, and a provisioning agent starts your bot on the platform's infrastructure.

You will see one of:

| Status        | Meaning                                        |
| ------------- | ---------------------------------------------- |
| **Queued**    | Waiting to be picked up. Usually seconds.      |
| **Running**   | Being set up right now.                        |
| **Succeeded** | Your bot is online and answering.              |
| **Failed**    | It could not be set up, with the reason shown. |

A failure is retried automatically a few times before it stops and asks for a human. **The reason is shown to you** rather than buried in a log — a provision that failed silently is indistinguishable, from your side, from one that never ran.

## Common failures

| What you see                                                     | What it means                                                                                                                       |
| ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **"no bot token stored"**                                        | The token was never saved. Add it and request again.                                                                                |
| **"logged in as application X but the tenant's OAuth app is Y"** | Your bot token belongs to a **different Discord application** than your client ID. Usually from copying a token from the wrong app. |
| **"never answered"**                                             | The bot started but did not reach Discord — most often an invalid or reset token.                                                   |

{% hint style="info" %}
**Resetting your bot token in Discord's portal breaks your running bot immediately.** Discord invalidates the old one the moment you press Reset. If you rotate it, save the new token in the console and request provisioning again.
{% endhint %}

## Inviting it to your server

The console gives you an invite link built from **your** application, so you are adding **your** bot.

It asks for Administrator. That is a broad grant and you should understand it: the bot manages roles, channels and messages across your server, and the narrower set it used to request had to be re-granted by hand every time a new feature shipped.

## What the bot does

Slash commands, checkout tracking, invoices, DMs to members, forms. See [How Discord fits in](/acoservice-documentation/discord-integration/discord.md) and [Slash commands](/acoservice-documentation/discord-integration/slash-commands.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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 following URL with the `ask` and `goal` query parameters:

```
GET https://acoservice.gitbook.io/acoservice-documentation/running-your-aco/your-bot.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
