# Config.yml

Our config is very simple but it can customize a lot the chats.\
\
**This section will not talk about the first and second section**: licence and database. [Check here to get more information.](https://alexmens.gitbook.io/chatplus/getting-started/installation)

### <mark style="color:blue;">DiscordSRV Section</mark>

```
settings:
  write-discord-onlylink: true
  use-custom-format-discord: true
  custom-format-discord: "%chatprefix% &b[%userprefix%&b] &b[%groupprefix%&b] &7%name% &8• %chatcolor%%chatmessage% &7(Discord)"
```

This category **will manage the DiscordSRV hook**. If you don't use it you can skip.

* *write-discord-onlylink*: If true only linked-account can write on Discord text channels plugged with ChatPlus.
* *use-custom-format-discord*: If true when a player send a message to a chat from Discord it will use the below custom discord format. If false it will use normal format.
* custom-format-discord: Here you can change the discord format.&#x20;

### <mark style="color:blue;">Format Section</mark>

```
chats:
  formats:
    staff: "%chatprefix% &7Staffer(x) &8• %chatcolor%%chatmessage%"
    default: "%chatprefix% &b[%userprefix%&b] &b[%groupprefix%&b] &7%name% &8• %chatcolor%%chatmessage%"
```

This category is dedicated **to in-game-chat formats.**

* *default: Is the format that will uses every chat if not configured below.*

Now you can, as staff string, **add with the format:**

* \<ChatId>: \<format>

**every chat you want**. That chats will **automatic take that format** not the default one. \
Like:

```
chats:
  formats:
    staff: "%chatprefix% &7Staffer(x) &8• %chatcolor%%chatmessage%"
    default: "%chatprefix% &b[%userprefix%&b] &b[%groupprefix%&b] &7%name% &8• %chatcolor%%chatmessage%"
    factions_teama: "%chatprefix% &7%name% &8• %chatmessage%"
    gang: "%chatprefix% &7Operator &8• %chatcolor%%chatmessage%"
```

## <mark style="color:blue;">All Placeholders of Formats</mark>

Here you can find **all placeholders** that you can use in the **format settings.**

* **%chatprefix%** - The prefix you set on chat creation.
* **%userprefix%** - The prefix of the player that send the message.
* **%groupprefix%** - The prefix of group of the player that send the message.
* **%name%** - The name or the custom name of the player that send the message.
* **%chatcolor%** - That color you set on chat creation.
* **%chatmessage%** - The message sended by the player.


---

# Agent Instructions: 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://alexmens.gitbook.io/chatplus/configuration-files/config.yml.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.
