> For the complete documentation index, see [llms.txt](https://mythicalbot.gitbook.io/arklynn-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mythicalbot.gitbook.io/arklynn-docs/miscellaneous/stats.md).

# Stats

### Commands (Slash Commands)

Only users with **Manage Server** (Administrator) permission can use these commands.

| Command          | What it does                                                                |
| ---------------- | --------------------------------------------------------------------------- |
| `/setup_stats`   | Opens an interactive panel to configure all statistics channels.            |
| `/refresh_stats` | Immediately updates all statistics channels (no need to wait 5 minutes).    |
| `/stats_preview` | Shows a preview of current server statistics without changing any channels. |

***

### What Statistics Can You Show?

You can enable or disable each of these:

| Stat            | Shows                             | Example            |
| --------------- | --------------------------------- | ------------------ |
| **All Members** | Total humans + bots               | `All Members: 127` |
| **Members**     | Human members only                | `Members: 112`     |
| **Bots**        | Bot accounts                      | `Bots: 15`         |
| **Boosts**      | Server boost count                | `Boosts: 8`        |
| **Online**      | Human members who are not offline | `Online: 43`       |

Each stat can be a **voice channel** or a **text channel**.

***

### How to Set It Up – Step by Step

#### 1. Run the command

text

```
/setup_stats
```

The bot sends you a private (ephemeral) message with an interactive embed.

#### 2. Use the buttons to configure

| Button                                                         | Action                                                                                      |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| **Category Name**                                              | Change the folder name (default: `📊 SERVER STATS 📊`)                                      |
| **All Members**, **Members**, **Bots**, **Boosts**, **Online** | Configure each channel individually: set its name, type (voice/text), and enable/disable it |
| **Toggle All**                                                 | Turn all channels on or off at once                                                         |
| **Save & Update**                                              | Apply your settings and create/update the channels                                          |
| **Cancel**                                                     | Abort without saving                                                                        |

Clicking a channel button opens a small window where you can enter:

* **Channel Name** – The base text (e.g., `All Members`). The bot will automatically add `: {count}`.
* **Channel Type** – Type `voice` or `text`.
* **Enabled** – Type `yes` or `no`.

#### 3. Save

Click **Save & Update**. The bot will:

* Create the category (folder) with your chosen name.
* Create or update only the enabled channels.
* Delete any old statistics channels that are no longer enabled.
* Set permissions so that **only administrators** can see and join these channels.

After saving, the bot shows a final preview of your live statistics channels.

***

### What Happens After Setup?

* **Auto‑update:** Every 5 minutes, the bot updates the numbers in the channel names (e.g., `All Members: 127` → `All Members: 130`).
* **Manual update:** Run `/refresh_stats` anytime to update immediately.
* **Preview only:** Run `/stats_preview` to see the numbers without changing channels.

> The bot updates all servers that have statistics set up. You don’t have to do anything after the initial setup.

***

### Permissions

* **Regular members** cannot see the statistics category or its channels. This keeps your channel list clean.
* **Administrators** (anyone with `Manage Server` permission) can see, join, and manage the channels.
* **The bot** keeps full access to update names and manage the channels.

You can manually change permissions later, but it’s recommended to leave them as the bot sets them.

***

### Troubleshooting

| Problem                                           | What to do                                                                                                                                       |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `/setup_stats` doesn’t appear as a slash command  | Re‑invite the bot with the `applications.commands` scope, or wait up to 60 minutes for slash commands to sync.                                   |
| The bot says “Critical error – check permissions” | Make sure the bot has these permissions: `Manage Channels`, `Manage Roles`, `Send Messages`, `Embed Links`, `View Channel`.                      |
| Numbers are not updating                          | Wait 5 minutes or run `/refresh_stats`. If still not updating, check that the bot is still in the server and has the needed permissions.         |
| Regular members can see the stats channels        | Run `/setup_stats` again and click **Save & Update** – the bot will reset permissions correctly.                                                 |
| I disabled a channel but it still exists          | The bot deletes disabled channels only when you click **Save & Update** again. If you want it removed, run `/setup_stats`, disable it, and save. |
| Boost count or online count looks wrong           | The bot updates every 5 minutes. Run `/refresh_stats` to get the latest numbers immediately.                                                     |

***

### Tips for Best Results

* **Use voice channels** – they show the number in the member list and take very little space.
* **Keep the category collapsed** – this makes your channel list tidy.
* **Disable stats you don’t need** – for example, if your server has no boosts, turn off `Boosts`.
* **Emojis in category name** are fine – the default `📊 SERVER STATS 📊` works well, but you can change it.

***

### Example: Setting Up a Simple Stats Panel

1. Admin runs `/setup_stats`
2. Changes category name to `📈 Live Stats`
3. Enables `All Members` as a voice channel, `Members` as a voice channel, and `Boosts` as a text channel.
4. Disables `Bots` and `Online`.
5. Clicks **Save & Update**.
6. The bot creates:
   * Category `📈 Live Stats`
   * Voice channel `All Members: 127`
   * Voice channel `Members: 112`
   * Text channel `Boosts: 8`
7. Every 5 minutes, the numbers update automatically.\
   The admin can also run `/refresh_stats` to update right away.


---

# 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 current page URL with the `ask` query parameter:

```
GET https://mythicalbot.gitbook.io/arklynn-docs/miscellaneous/stats.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.
