# Staff Chat

{% hint style="info" %}
This functionality requires the DiscordSRV plugin
{% endhint %}

You can use the discord integration plugin to setup a staff-chat channel and synchronize messages between in-game and discord chat.\
\
To do so you must have the DiscordSRV bot configured as described here: <https://docs.dedicatedmc.io/plugins-mods/how-to-install-discordsrv/>\
\
Once this is setup you can start setting up Staff++ Discord.

### **Discord setup**

Go into Discord and create a new channel. The channel name can be whatever you want.

![](https://292687455-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MPQohtcLxhXAvpSXOMt%2F-MVWaQr8Ww_0ZizXj570%2F-MVWbrULqKVH6iu6Nect%2Fcreate_channel.png?alt=media\&token=cca9fef7-7765-451d-9e5e-fc29d4fe111c)

![](https://292687455-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MPQohtcLxhXAvpSXOMt%2F-MVWaQr8Ww_0ZizXj570%2F-MVWc3U8hOoJTOEFUvea%2Fcreate_channel2.png?alt=media\&token=f0227203-d132-4dfb-8edc-49c5d198bf9f)

Go ahead an grab the **channel id** by right clicking on the channel name and selecting **copy id:**

![](https://292687455-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MPQohtcLxhXAvpSXOMt%2F-MVWaQr8Ww_0ZizXj570%2F-MVWfmTDwt3xcStw5S3q%2Fcopy_id.png?alt=media\&token=a4243fc3-51ca-4d07-9ca9-72702ee5d167)

### DiscordSRV Configuration

Open the **config.yml** file of the DiscordSRV plugin. Add your channel id to the channels array.\
The identifier inside the array must be **"staffplusplus-staffchat".**

```yaml
Channels: { "global": "000000000000000000", "staffplusplus-staffchat": "xxxxxxxxxxxxxxxxxxxxx"}
```

### Staff++ Discord Configuration

Open the config.yml of the Staff++ plugin. And enable staffchat sync.

```yaml
StaffPlusPlusDiscord:
  staffchat:
    # message format is no longer supported. 
    # Instead you must configure the format using DiscordSRV
    message-format: '&9&l(discord) &7%text%'
    sync: true
```

That's it! Restart your server and you will be see that message in game get displayed inside your discord channel and vice versa.&#x20;

### Example messages

![](https://292687455-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MPQohtcLxhXAvpSXOMt%2F-MVWaQr8Ww_0ZizXj570%2F-MVWjhM7I0S3lYZsPKeS%2Fstafchat_message_from_discord.png?alt=media\&token=6362ba99-8e14-4a5d-aa1c-3f1cf874c0fa)

![](https://292687455-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MPQohtcLxhXAvpSXOMt%2F-MVWaQr8Ww_0ZizXj570%2F-MVWjwIRiPvluRGgz4qQ%2Fstafchat_discord_channel_message.png?alt=media\&token=97312476-1349-40a7-ab96-fefa6c115687)
