> For the complete documentation index, see [llms.txt](https://docs.hyper-code.eu/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyper-code.eu/documentation/teamchat/config.md).

# Premium Teamchat – Configuration

All options in shared/config.lua of Premium Teamchat: framework, mouse key, time format, position, staff groups, hide command, Discord log and style.

All settings are in `shared/config.lua`. This file is not escrowed.

## Framework

```lua
Config.Framework = "es_extended" -- or "qb-core"
```

The resource name of your framework. See [Installation](https://docs.hyper-code.eu/documentation/teamchat/installation.md#3-select-your-framework).

## Teamchat

| Option                            | Default      | Description                                                                                                                                               |
| --------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Teamchat.TriggerMouseKey` | `166`        | Control that shows or hides the mouse cursor to write in the chat (`166` = F5)                                                                            |
| `Config.Teamchat.TimeFormat`      | `"24h"`      | Time format of the messages: `"12h"` or `"24h"`                                                                                                           |
| `Config.Teamchat.Position`        | `"50%"`      | Distance of the chat window from the top of the screen                                                                                                    |
| `Config.Teamchat.HideCommand`     | `"teamchat"` | Command to hide / show the chat temporarily. Set to `false` to disable it. See [Commands](https://docs.hyper-code.eu/documentation/teamchat/commands.md). |

## Staff groups

```lua
Config.Teamchat.Permissions = {
    {Group = "owner", Label = "Projektleitung"},
    {Group = "admin", Label = "Administrator"},
    {Group = "mod", Label = "Moderator"}
}
```

| Field   | Description                                    |
| ------- | ---------------------------------------------- |
| `Group` | Permission group of your framework             |
| `Label` | Rank name shown next to the sender in the chat |

* Only players in one of these groups see the chat, can write in it and are counted as online team members.
* If a player is in several groups, the first matching entry in the list is used for the label.
* On **ESX** the player group (`xPlayer.getGroup()`) must match `Group` exactly.
* On **QBCore** the group is checked with `QBCore.Functions.HasPermission` (for example `admin`, `god`).

Access is checked every 10 seconds. If a player gets or loses a group, the chat appears or disappears within that time.

## Discord log

```lua
Config.Discord = {
    Webhook = "https://discord.com/api/webhooks/",
    AuthorName = "HyperCode Teamchat",
    Color = 0xff0040
}
```

| Option       | Description                                   |
| ------------ | --------------------------------------------- |
| `Webhook`    | Webhook URL. Set to `""` to turn logging off. |
| `AuthorName` | Name of the webhook author                    |
| `Color`      | Embed colour (hex)                            |

Every message is logged with the sender name, rank and text.

## Translation and colours

```lua
Config.Translation = { ['InputPlaceholder'] = "Write a message..." }

Config.Style = { LightColor = "rgb(255, 0, 64)", DarkColor = "rgb(138, 0, 34)" }
```

* `InputPlaceholder` is the placeholder text of the input field.
* `Config.Style` sets the two accent colours of the UI. No HTML or CSS knowledge needed.
