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

# Commands

> Prefix and slash commands for Murder Mystery Bot lobbies, play, progress, admin, and debug.

Prefix and slash commands share the same game rules. Lobby codes look like `MM-7F2A`. One person cannot take two seats in a lobby.

`!help` and `/help` show Murder Mystery Bot v2.0.0 plus the command catalog. In-game role lists are also available with `!wiki` and `/wiki`.

Create and join are rate limited. Game slash commands do not run in DMs. A whisper is a DM, not a server channel. The shop is nighttime only, in a DM or by slash command.

## Lobby

| Action | Prefix | Slash | Permission |
| - | - | - | - |
| Create | `!create` | `/create` | none; debug mode needs `debug.createGame` |
| Join | `!join <code>` | `/join` | `member.join` |
| List | `!list` | `/list` | `member.list` |
| Spectate | `!spectate <code>` | `/spectate` | `member.spectate` |
| Leave | `!leave` | `/leave` | in a game |
| Force start | `!forceStart` | `/force-start` | lobby host or admin |
| Start a code | `!startGame <code>` | `/start-game` | lobby host or `admin.game.startGame` |

`!create` shows the code plus **Join & Play**, **Spectate instead**, and **Allow DMs from this bot**. Joining also sends a DM. If that DM is blocked, the status channel mentions the player and shows the same button. If only one lobby is open, `!spectate` can omit the code. Discord administrators join with `-overwriteAdminWarning`, for example `!join MM-7F2A -overwriteAdminWarning`.

`!forceStart` also answers to `!ownerstart` and `!fs`.

## During a game

| Action | Prefix | Slash |
| - | - | - |
| Vote | `!vote @player` | `/vote` |
| Shop | `!shop` | `/shop` |
| Buy | `!buy <item>` | `/buy` |
| Use an item | `!use <item> [argument]` | `/use` |
| Whisper | `!whisper @player` | `/whisper` |
| Gold | `!balance` | `/balance` |

Voting is daytime only. `!balance` also answers to `!money`, `!gold`, and `!bal`.

## Progress

| Action | Prefix | Slash | Permission |
| - | - | - | - |
| Help | `!help` | `/help` | `member.help` |
| Level | `!level [player]` | `/level` | `member.levels.level` |
| Objective | `!objective` | `/objective` | `member.levels.objective` |
| Stats | `!stats [player]` | `/stats` | `member.levels.stats` |
| Prefix | `!prefix` | `/prefix` | viewing needs no permission |

Changing the prefix is covered on [server settings](/projects/murder-mystery/settings).

## Admin

These need the matching admin permission, or Discord administrator.

* `!setup` or `/setup` configures the server. It does not create channels.
* `!settings` or `/settings`, and `!settingspanel` or `/settingspanel`, change timers, the prefix, disabled commands, and live lobbies. See [server settings](/projects/murder-mystery/settings).
* `!cleanup` ends every lobby. Aliases: `!endGames`, `!stopGames`, `!endAllGames`, `!stopAllGames`. Slash: `/cleanup`.
* `!endGame <code>` ends one lobby. Alias: `!stopGame`. Slash: `/end-game`.
* `!kick @member` or `/kick` removes a player.
* `!giveGold <player> <amount>` or `/give-gold` adds gold during a game. Permission: `admin.game.giveGold`.
* `!resetState` or `/reset-state` ends games and clears this server's in-memory lobbies. Permission: `admin.resetState`.
* `!status` or `/status` shows bot health. Needs `admin.*`, or Discord administrator.
* `!addPermission`, `!removePermission`, and `!permissions` edit the permission tree.

<Note>
  There is no `!purge` command and no voice-channel setting.
</Note>

## Permissions

Permissions are a tree. A stored `admin.*` grant allows every admin command. Discord administrators bypass the tree. Grants can be given to a member or a role. Removing a permission from a member blocks that permission even when the server default would have allowed it.

```text theme={null}
!addPermission @User member.join
!removePermission @Role admin.settings
!permissions @User
```

Only people who already have the matching admin permission can grant, revoke, reset a server, force-start or end games, or change configuration.

## Debug

<Warning>
  Debug commands can break a running game. They need the listed permission.
</Warning>

* `!createGame True` creates a short debug lobby. Permission: `debug.createGame`.
* `!skipVotes <code>` and `/skip-votes`. Permission: `debug.game.skipVotes`.
* `!skipNight <code>` and `/skip-night`. Permission: `debug.game.skipNight`.
* `!setWeather <code> <0-99>` and `/set-weather`. Permission: `debug.game.setWeather`.
* `!setMoon <code> <1-5>` and `/set-moon`. Permission: `debug.game.setMoon`.
* `!giveObjective`, `!addObjectiveProgress`, `!completeCurrentObjective`, and `!skipObjectiveTimer` edit objectives. These stay prefix-only.


## Related topics

- [Server settings](/projects/murder-mystery/settings.md)
- [Murder Mystery Bot](/projects/murder-mystery/overview.md)
- [Murder Mystery Bot terms](/projects/murder-mystery/terms.md)
- [Project overview](/public/overview/projects.md)
- [Murder Mystery Bot privacy](/projects/murder-mystery/privacy.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.