# Discord Integration

## Introduction

Discord integration lets Staff++ notify certain events to your discord server using discord webhooks.

To Enable integration you need to install a separate **plugin:** <https://www.spigotmc.org/resources/staff-discord-integration.83871/>

## Configuration

The configuration of the discord integration plugin is fairly simple.

```yaml
StaffPlusPlusDiscord:
    templatePack: "default" # Choose from template packs "default" or "videndum"
    updateTemplates: true
    
    # REPORTS
    # The discord webhook url. This can be found in you discord server settings
    webhookUrl: ""
    # Trigger a discord message when some player opens a new report
    notifyOpen: true
    # Trigger a discord message when a staff member for some reason decides to not handle a report and he unassigns himself
    notifyReopen: true
    # Trigger a discord message when a staff member assigns himself to an open report
    notifyAccept: true
    # Trigger a discord message when a staff member rejects a report
    notifyReject: true
    # Trigger a discord message when a staff member resolves a report
    notifyResolve: true

    warnings:
        webhookUrl: ""
        notifyCleared: true
        notifyCreate: true
        notifyThresholdReached: true
        appeals:
            webhookUrl: ""
            notifyCreate: false
            notifyApproved: false
            notifyRejected: false
    bans:
        webhookUrl: ""
        ban: false
        unban: false
    kicks:
        webhookUrl: ""
        kick: false
    mutes:
        webhookUrl: ""
        mute: false
        unmute: false
    altDetect:
        webhookUrl: ""
        # Levels that should be notified to discord, leave empty to disable all notifications. Should be semi-colon separated
        # possible values: POSITIVE, FAIRLY_POSITIVE, POSSIBLE, NOT_LIKELY
        # example value: POSITIVE;FAIRLY_POSITIVE
        enabledTrustLevels: ""
    xray:
        webhookUrl: ""
        # Ores that should be notified to discord, leave empty to disable all notifications. Should be semi-colon separated
        # possible values: any bukkit material
        # example value: DIAMOND;REDSTONE
        enabledOres: ""
    staffmode:
        webhookUrl: ""
        # Trigger a discord message whenever a staffmember enters staffmode
        notify-enter: false
        # Trigger a discord message whenever a staffmember enters staffmode
        notify-exit: false
    chat:
        webhookUrl: ""
        # Trigger a discord message whenever a a player sends a chat message containing predefined words/phrases
        phrase-detection: false
    staffchat:
        sync: false
        message-format: "&9&l(discord) &7%text%"
```

Make sure you create a webhook on your discord server. This can be done by following this guide: <https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks> Once you created the webhook paste it inside the configuration file.

#### commands

| Command\`                    | Description                                                                            |
| ---------------------------- | -------------------------------------------------------------------------------------- |
| /staffplusplusdiscord reload | Reload the entire configuration, this includes the discord templates and webhook urls. |

#### permissions

| Permission                  | Description                     |
| --------------------------- | ------------------------------- |
| staffplusplusdiscord.reload | Allows using the reload command |

### Examples:

{% hint style="info" %}
All discord templates can be [customized](https://wiki.staffplusplus.org/master/integrations/discord-integration/customize-discord-templates).&#x20;
{% endhint %}

#### Report

![](https://292687455-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MPQohtcLxhXAvpSXOMt%2F-MPQw1Rfn9D70aUB6_YI%2F-MPQwUu2TYTKNSyORCoy%2Freport.png?alt=media\&token=bb35ca57-2e3f-4cbe-bf45-ee6e161a276a)

#### Warning

![](https://292687455-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MPQohtcLxhXAvpSXOMt%2F-MPQw1Rfn9D70aUB6_YI%2F-MPQwYWcT4Kopb3YXN7D%2Fwarn.png?alt=media\&token=1dd97c5f-6138-4394-be6f-f42d174336a8)
