> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mira.party/llms.txt
> Use this file to discover all available pages before exploring further.

# Counting

> A counting channel with lives, milestones, goals and arithmetic support.

Members count upward one message at a time. Get it wrong and you lose a life; run out of lives and it resets. It's a simple idea with a surprising number of dials.

Requires **Manage Channels**.

## Setting up

```javascript theme={null}
!counting setup #counting
```

Starts at 0, counting by 1. Both are configurable:

```javascript theme={null}
!counting setup #counting 100 5
```

Starts at 100, counting in steps of 5. Aliases: `create`, `enable`, `add`.

## Core settings

<CodeGroup>
  ```javascript Step size theme={null}
  !counting set step #counting 2
  ```

  ```javascript Lives before a reset theme={null}
  !counting set lives #counting 3
  ```

  ```javascript Per-user cooldown theme={null}
  !counting set cooldown #counting 5
  ```

  ```javascript Restrict to a role theme={null}
  !counting set role #counting @Verified
  ```

  ```javascript Fix the count manually theme={null}
  !counting set current #counting 500
  ```
</CodeGroup>

`counting set lives` is the one that changes the feel most. With 1 life, a single mistake resets everything — tense, and frustrating on a big server. With 3–5, the count survives the occasional slip.

`counting set cooldown` (alias `slowmode`) stops one person counting alone at speed. `0` disables it.

## Reaction emojis

```javascript theme={null}
!counting set emoji #counting correct ✅
!counting set emoji #counting incorrect ❌
```

What gets reacted to each count.

## Milestones and goals

<CodeGroup>
  ```javascript Celebrate every 100 theme={null}
  !counting set milestone #counting 100
  ```

  ```javascript With a custom message theme={null}
  !counting set milestone #counting 100 {description: **{count}** — nice work everyone}
  ```

  ```javascript A target to reach theme={null}
  !counting set goal #counting 1000 @Counter "we did it"
  ```
</CodeGroup>

`goal` takes a number, an optional role granted to everyone who participated, and an optional message. It fires once when the count reaches that number.

## Toggles

```javascript theme={null}
!counting toggle #counting <option>
```

| Option            | Effect                                                 |
| ----------------- | ------------------------------------------------------ |
| `math`            | Allow arithmetic — `50+50` counts as 100               |
| `repeat`          | Allow the same person to count twice in a row          |
| `deleteinvalid`   | Delete messages that aren't a valid count              |
| `deleteothers`    | Delete messages from members without the required role |
| `editprotection`  | Delete the latest count if its message gets edited     |
| `resetonfail`     | Reset to 0 when lives run out                          |
| `announceresets`  | Post in-channel when the count resets                  |
| `announcerecords` | Post in-channel on a new high count                    |
| `pinmilestones`   | Pin the message that hits a milestone                  |

<Tip>
  `editprotection` closes the most annoying exploit: counting `5`, then editing it to `500` so everyone after you is wrong. Turn it on.

  `math` is genuinely fun on a server that's into it — `{7*8}` for 56 — and unbearable on one that isn't. Try it and see.
</Tip>

## Viewing and resetting

<CodeGroup>
  ```javascript Progress and settings theme={null}
  !counting view #counting
  ```

  ```javascript Top counters theme={null}
  !counting leaderboard #counting
  ```

  ```javascript All counting channels theme={null}
  !counting list
  ```

  ```javascript Reset to 0 theme={null}
  !counting reset #counting
  ```

  ```javascript Stop counting there theme={null}
  !counting remove #counting
  ```
</CodeGroup>

`counting leaderboard` (aliases `lb`, `top`) needs no permission — anyone can check.

## A recommended setup

```javascript theme={null}
!counting setup #counting
!counting set lives #counting 3
!counting set cooldown #counting 3
!counting set milestone #counting 100
!counting toggle #counting editprotection
!counting toggle #counting deleteinvalid
!counting toggle #counting announcerecords
!counting toggle #counting resetonfail
```

Forgiving enough that the count actually grows, protected against the obvious exploits, and it celebrates progress without spamming.

<Note>
  Blacklist the counting channel from [levels](/setup/levels#blacklisting) — otherwise your XP leaderboard becomes a counting leaderboard.

  ```javascript theme={null}
  !level blacklist #counting
  ```
</Note>

## Command reference

| Command                                                  | Aliases                   | Description                 |
| -------------------------------------------------------- | ------------------------- | --------------------------- |
| `counting setup <channel> [start] [step]`                | `create`, `enable`, `add` | Create a counting channel   |
| `counting set step <channel> <value>`                    | —                         | Increment per count         |
| `counting set lives <channel> <amount>`                  | `strikes`                 | Mistakes before a reset     |
| `counting set cooldown <channel> <seconds>`              | `slowmode`                | Per-user cooldown           |
| `counting set role <channel> [role]`                     | —                         | Restrict to a role          |
| `counting set current <channel> <value>`                 | `count`, `now`            | Set the count manually      |
| `counting set emoji <channel> <kind> <emoji>`            | —                         | Correct/incorrect reactions |
| `counting set milestone <channel> [interval] [template]` | —                         | Milestone messages          |
| `counting set goal <channel> [number] [role] [message]`  | —                         | A target to reach           |
| `counting toggle <channel> <option>`                     | —                         | Toggle a boolean setting    |
| `counting view <channel>`                                | `settings`, `info`        | Progress and settings       |
| `counting leaderboard [channel]`                         | `lb`, `top`               | Top counters                |
| `counting list`                                          | `ls`                      | All counting channels       |
| `counting reset <channel>`                               | `clear`, `purge`          | Reset to 0                  |
| `counting remove <channel>`                              | `delete`, `del`, `stop`   | Stop counting               |

Group aliases: `count`, `number`, `numb`.
