> For the complete documentation index, see [llms.txt](https://dejvokep.gitbook.io/chatgames/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dejvokep.gitbook.io/chatgames/commands-and-permissions/commands.md).

# Commands

## Player commands

### Changing game visibility :eyes:

`/cg show` `/cg hide` `/cg toggle` (permission: `chatgames.visibility`)

**Shows, hides or toggles the visibility (showing and hiding) of games.**

<figure><img src="/files/M9kG3tYQA1eAquKzeuHQ" alt=""><figcaption><p>Default show/hide messages.</p></figcaption></figure>

### Looking up wins :gem:

`/cg wins [name|uuid]` (permission: `chatgames.wins`)

**Shows wins of a player identified by the given UUID or name. If the argument is not provided, displays your statistics (in this case the command must not be run from console).**

<figure><img src="/files/TwztVGLlhXYFVUI4QMNY" alt=""><figcaption><p>Default wins message.</p></figcaption></figure>

### Leaderboard :trophy:

`/cg leaderboard [page] [-refresh / -r]` (permission: `chatgames.leaderboard`)

**Shows the cached leaderboard at the given page. If the page argument is not provided, displays the first page.**

The cached leaderboard is refreshed automatically every 5 minutes. To change this, update `leaderboard-refresh-delay` in the config.

**Admins only:**

If you need to refresh the leaderboard immediately, you can do so by using the `-refresh` flag which requires permission `cg.leaderboard.refresh`.

<figure><img src="/files/s8dON1Yg3LAH66AnMk4x" alt=""><figcaption><p>Default leaderboard message.</p></figcaption></figure>

## Admin commands

### Diagnosing :information\_source:

`/cg diagnostics` (permission: `chatgames.diagnostics`, admins only)

**Shows information needed for issue diagnosing, but also useful data and server wide statistics. That is, database sizes, server statistics, game statuses and runtime information.**

<figure><img src="/files/TmKGAFkZ1DBFgOQmhNju" alt=""><figcaption><p>Diagnostics, image 1/2.</p></figcaption></figure>

<figure><img src="/files/SSWttIRDF7vG25HZZrVM" alt=""><figcaption><p>Diagnostics, image 2/2.</p></figcaption></figure>

### Starting a game :checkered\_flag:

`/cg start [game]` (permission: `chatgames.start`, admins only)

**Starts a new game by the given name, or, if game was not given, a random game.**

If there's a currently active game, it is stopped.

### Stoping a game :octagonal\_sign:

`/cg stop` (permission: `chatgames.stop`, admins only)

**Stops the currently active game.**

### Deleting data :put\_litter\_in\_its\_place:

`/cg delete <name|uuid|all>` (permission: `chatgames.delete` + `chatgames.confirm`, admins only)

**Deletes data associated with a player identified by the given UUID or name, or deletes all data from the data storage.**

Data deletion is subject to confirmation by calling `/cg confirm` within 20s of executing the delete command.

### Reloading :recycle:

`/cg reload` (permission: `chatgames.reload`, admins only)

**Reloads the plugin configuration.**
