> For the complete documentation index, see [llms.txt](https://axieum.gitbook.io/chatter-for-minecraft/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axieum.gitbook.io/chatter-for-minecraft/discord/theme/presences.md).

# Bot Presences

A bot presence allows you to show a more detailed online status. Mix that with a timer, and you have a periodically updating bot status!

## Examples

![Playing / Default](/files/-MWxxEhN5wcflSkYoclN)

![Watching](/files/-MWxxAVNPIePJBPKM9Xq)

![Listening](/files/-MWxx6W-X0m7Zr-lQhu_)

![Streaming](/files/-MWxxK6FbdS1kySTXmkZ)

{% tabs %}
{% tab title="Example #1" %}
{% code title="config/chatter/discord/theme.json5" %}

```javascript
{
	// ...

	// Bot presences relayed periodically
	"presence": {
		// The number of seconds between presence updates (must be >=15)
		"interval": 60,
		// True if the presences should be randomly selected
		"random": false,
		// Presences
		"entries": [
			{
				// The type of presence (see https://git.io/Jqkez)
				"type": "DEFAULT",
				// The text value that is put on display
				"value": "Minecraft",
				// If defined, sets the URL of the underlying media, e.g. Twitch stream
				"url": null
			},
			{
				// The type of presence (see https://git.io/Jqkez)
				"type": "STREAMING",
				// The text value that is put on display
				"value": "Xisumavoid",
				// If defined, sets the URL of the underlying media, e.g. Twitch stream
				"url": "https://www.twitch.tv/xisumavoid"
			},
			{
				// The type of presence (see https://git.io/Jqkez)
				"type": "LISTENING",
				// The text value that is put on display
				"value": "${tps} TPS",
				// If defined, sets the URL of the underlying media, e.g. Twitch stream
				"url": null
			},
			{
				// The type of presence (see https://git.io/Jqkez)
				"type": "WATCHING",
				// The text value that is put on display
				"value": "${player_count} player",
				// If defined, sets the URL of the underlying media, e.g. Twitch stream
				"url": null
			}
		]
	},

	// ...
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Configuration

{% hint style="success" %}
Made changes to the configuration? Type **`/reload`** to apply the changes immediately!
{% endhint %}

### Update Interval

The number of seconds between presence updates.

{% hint style="danger" %}
A presence update interval shorter than **15 seconds** will lead to rate limits!
{% endhint %}

{% code title="config/chatter/discord/theme.json5" %}

```javascript
{
	// ...
	"presence": {
		// The number of seconds between presence updates (must be >=15)
		"interval": 30,
	}
}
```

{% endcode %}

### Choose Randomly

By default, the presence entries are chosen on a round-robin basis, however, this can be changed to a random selection here.

{% tabs %}
{% tab title="Random" %}
{% code title="config/chatter/discord/theme.json5" %}

```javascript
{
	// ...
	"presence": {
		// True if the presences should be randomly selected
		"random": true,
	}
}
```

{% endcode %}
{% endtab %}

{% tab title="In-Order" %}
{% code title="config/chatter/discord/theme.json5" %}

```javascript
{
	// ...
	"presence": {
		// True if the presences should be randomly selected
		"random": false,
	}
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Presence Entries

A list of presences to be conveyed throughout the lifecycle of the bot.

{% code title="config/chatter/discord/theme.json5" %}

```javascript
{
	// ...
	"presence": {
		// Presences
		"entries": [
			// Add presence entries here
		]
	}
	// ...
}
```

{% endcode %}

#### Type

The type of presence status to be shown.

You can choose from the following types: `DEFAULT`, `STREAMING`, `LISTENING`, and `WATCHING`.

```javascript
// The type of presence (see https://git.io/Jqkez)
"type": "DEFAULT",
```

#### Value

The text value that is put on display.

{% hint style="info" %}
Please refer to the [templating guide](/chatter-for-minecraft/misc/templating.md) for instructions on substituting player names, etc.
{% endhint %}

| Token                  | Type     | Meaning                                     | Example            |
| ---------------------- | -------- | ------------------------------------------- | ------------------ |
| `${version}`           | String   | The Minecraft server version                | 1.16.5             |
| `${ip}`                | String   | The server's IP address (possibly empty)    | 192.168.1.90       |
| `${port}`              | Integer  | The bound server's port                     | 25565              |
| `${motd}`              | String   | The message of the day (MOTD)               | A Minecraft Server |
| `${difficulty}`        | String   | The world difficulty                        | easy               |
| `${max_players}`       | Integer  | The maximum number of players allowed       | 20                 |
| `${player_count}`      | Integer  | The number of currently logged-in players   | 2                  |
| `${tps}`               | Double   | Average ticks per second (TPS)              | 20.00              |
| `${tps_time}`          | Double   | Average ticks per second (TPS) timing in ms | 12.513             |
| `${uptime[:format]}`   | Duration | For how long the server has been online     | 1 day 5 minutes    |
| `${datetime[:format]}` | DateTime | The current date & time                     | 01/01/2004         |

```javascript
/**
 * The text value that is put on display
 * Use ${version}, ${ip}, ${port}, ${motd}, ${difficulty}, ${max_players}, ${player_count}, ${tps}, ${tps_time}, ${uptime} and ${datetime[:format]}
 */
"value": "Minecraft ${version}",
```

#### Media URL

If defined, sets the URL of the underlying media, e.g. Twitch stream. This is used in conjunction with the `STREAMING` [presence type](/chatter-for-minecraft/discord/theme/presences.md#type).

```javascript
// If defined, sets the URL of the underlying media, e.g. Twitch stream
"url": "https://www.twitch.tv/xisumavoid",
```


---

# 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://axieum.gitbook.io/chatter-for-minecraft/discord/theme/presences.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.
