# Discord Einstellungen

## Konfiguration (discord-settings.yml)

### token

Hier musst du den Bot token hinein kopieren den du im Setup im [Schritt 5](/bungeesystem/module/discord-bot/setup.md#schritt-5-reset-bestaetigen) zwischen speichern solltest.

```yaml
token: ""
```

### state

*state* ist der OnlineStatus des Bots (grüner, gelber oder roter Kreis). Folgende Status können hier eingetragen werden:

* ONLINE
* IDLE
* DO\_NOT\_DISTURB
* INVISIBLE

```yaml
state: "ONLINE"
```

### activity

Hier gibst du den Typ der Aktivität an. Folgende Typen können hier eingetragen werden:

* PLAYING
* LISTENING
* WATCHING
* CUSOM

```yaml
activity: "PLAYING"
```

### content

*content* ist das value, also das was nach der Aktivität angezeigt wird.

```yaml
content: "Minecraft"
```

### guildID

Ersetze hier die `-1` durch die ID deines Servers (Guild)

<figure><img src="/files/XwUMiIEWm2rWExr3cyvm" alt=""><figcaption></figcaption></figure>

```yaml
guildID: -1
```

### replaceName

Wenn aktiviert, wird nach der Verlinkung zwischen Discord und Minecraft, der Discord name mit dem Namen des Minecraft Accounts ersetzt.

```yaml
replaceName: false
```

### link

Hier kannst du den Einladungslink zu deinem Discord eintragen.

{% hint style="info" %}
Wenn du im Minecraftchat den Link farbig angezeigt bekommen möchtest, setze einfach den entsprechenden ColorCodes  davor.

ColorCodes werden immer mit einem `&` Zeichen definiert. Eine Liste der möglichen ColorColdes gibt es [hier](https://htmlcolorcodes.com/minecraft-color-codes/). Nutze bitte aus der angezeigten Tabelle die Spalte `CHAT CODE` und ersetze das `§` -Zeichen mit dem `&`-Zeichen.
{% endhint %}

```yaml
link: ""
```

### commands

#### onlinetime

Setze enabled auf `true`, wenn du den Befehl aktivieren möchtest. Mit dem Slash-Befehl `/onlinetime` kann der Discordnutzer die Onlinezeit eines Minecraft-Spielers oder eines Discordnutzers sehen

```yaml
commands:
  onlinetime:
    enabled: true
    show:
      seconds: true
      minutes: true
      hours: true
      days: true
      years: true
```

### chats

Du kannst den Spielern ermöglichen, Nachrichten von Minecraft in Discord und von Discord in Minecraft anzeigen zu lassen. Trage dafür nur die chats ein, die die Spieler dafür nutzen dürfen.

Ersetze den *name* durch den Namen den der Spieler beim Kommando sehen soll und die channelID durch die ID des Discordchats.

{% hint style="danger" %}
Der angegebene Discordchat muss ein Textkanal sein!
{% endhint %}

```yaml
channels:
  countOfChannels: 2
  ingameChatName: "ingame"
  channelList:
    1:
      name: "chat"
      channelID: -1
    2:
      name: "techporn"
      channelID: -1
```

{% hint style="warning" %}
Hierfür muss das Modul `Chat` in der `config.yml` aktiviert sein!
{% endhint %}

### syncDiscord

Die Spieler haben die Möglichkeit sich mit Discord zu verbinden. Um das zu gewähren musst du nur die Teamgruppen und die Community Gruppen hier einfügen. Erstelle außerdem auf dem Discord Server deines Netzwerkes Rollen, die wie die Minecraft Gruppen heißen. kopiere die Rollen ID und füge diese ein.

Außerdem musst du die Anzahl der Teamgruppen und Communitygruppen eintragen.

{% hint style="warning" %}
Die Liste der Gruppen beginnt bei 1
{% endhint %}

```yaml
syncDiscord:
  countOfTeamGroups: 6
  countOfCommunityGroups: 1
  defaultColor: "&7"
  defaultGroup: "Player"
  # if a player unlink his account, which role will he get
  defaultRoleID: -1
  # replace '-1' with the id of the roles of your Discord Server
  # if you want you can edit the permission for the groups
  # the potency is for the weighting of the roles the smaller the number the higher the rank
  roles:
    community:
      1:
        name: "Premium"
        potency: 7
        color: "&6"
        roleID: -1
        permission: "bungeesystem.discord.premium"
      2:
        name: "Player"
        potency: 8
        color: "&7"
        roleID: -1
        permission: "bungeesystem.discord.player"
    teamGroups:
      1:
        name: "Owner"
        potency: 1
        color: "&4"
        roleID: -1
        permission: "bungeesystem.discord.owner"
      2:
        name: "Admin"
        potency: 2
        color: "&c"
        roleID: -1
        permission: "bungeesystem.discord.admin"
      3:
        name: "Moderator"
        potency: 3
        color: "&1"
        roleID: -1
        permission: "bungeesystem.discord.moderator"
      4:
        name: "Supporter"
        potency: 4
        color: "&9"
        roleID: -1
        permission: "bungeesystem.discord.supporter"
      5:
        name: "Developer"
        potency: 5
        color: "&b"
        roleID: -1
        permission: "bungeesystem.discord.developer"
      6:
        name: "Builder"
        potency: 6
        color: "&4"
        roleID: -1
        permission: "bungeesystem.discord.builder"
```

### Standard Konfiguration

```yaml
# to use the discord bot, please create a discord app here https://discord.com/developers/applications
# after that go to "bot" and enable under Privileged Gateway Intents the points "SERVER MEMBERS INTENT", "MESSAGE CONTENT INTENT" and "PRESENCE INTENT"
# furthermore paste your discord token here and invite the bot to your discord server.
#
# If the plugin was started and the module "discord verify" is enabled the bot will be started automatically
token: ""

# available states are ONLINE, IDLE, DO_NOT_DISTURB, INVISIBLE or leave empty for default (online)
state: "ONLINE"

# for example:
# activity: "PLAYING"
# content: "Minecraft"
# available activities are PLAYING, LISTENING, WATCHING or CUSTOM
# by CUSTOM the field content can be empty because only the content of the field 'activity' will be displayed
# or leave empty for no activity
activity: "PLAYING"
content: "Minecraft"

# replace '-1' with the id of the guild of your Discord Server
guildID: -1

# If enabled, the Discord name will be replaced with the Minecraft account name.
replaceName: false

# enter your Discord invite link here
# if you want to show the url in color in the minecraft chat please enter before the url a colorcode
link: ""

# you can choose which channel are available to write between discord and Minecraft
# it would be advantageous if no images were allowed to be broadcast in these channels.
# !!the name of the channel has to be in lower case!!
# syntax:
# name: "name of the channel"
# channelID: -1
channels:
  countOfChannels: 2
  ingameChatName: "ingame"
  channelList:
    1:
      name: "chat"
      channelID: -1
    2:
      name: "techporn"
      channelID: -1

syncDiscord:
  countOfTeamGroups: 6
  countOfCommunityGroups: 1
  defaultColor: "&7"
  defaultGroup: "Player"
  # if a player unlink his account, which role will he get
  defaultRoleID: -1
  # replace '-1' with the id of the roles of your Discord Server
  # if you want you can edit the permission for the groups
  # the potency is for the weighting of the roles the smaller the number the higher the rank
  roles:
    community:
      1:
        name: "Premium"
        potency: 7
        color: "&6"
        roleID: -1
        permission: "bungeesystem.discord.premium"
      2:
        name: "Player"
        potency: 8
        color: "&7"
        roleID: -1
        permission: "bungeesystem.discord.player"
    teamGroups:
      1:
        name: "Owner"
        potency: 1
        color: "&4"
        roleID: -1
        permission: "bungeesystem.discord.owner"
      2:
        name: "Admin"
        potency: 2
        color: "&c"
        roleID: -1
        permission: "bungeesystem.discord.admin"
      3:
        name: "Moderator"
        potency: 3
        color: "&1"
        roleID: -1
        permission: "bungeesystem.discord.moderator"
      4:
        name: "Supporter"
        potency: 4
        color: "&9"
        roleID: -1
        permission: "bungeesystem.discord.supporter"
      5:
        name: "Developer"
        potency: 5
        color: "&b"
        roleID: -1
        permission: "bungeesystem.discord.developer"
      6:
        name: "Builder"
        potency: 6
        color: "&4"
        roleID: -1
        permission: "bungeesystem.discord.builder"
```

## Kommandos

### Syntax

| Kommando                     | Beschreibung                                                                                               |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------- |
| /discord                     | Bekomme den Einladungslink zum Discord Server                                                              |
| /link \<NutzerID/Nutzername> | <p>Gebe deine NutzerID oder deinen Nutzername (Nicht Nickname)<br><a href="#nutzername">siehe hier</a></p> |
| /verify \<code>              | Gebe den Verifikationscode ein, der dir vom Discord Bot gesendet wurde, um die Verlinkung zu beenden       |
| /unlink                      | Löse deine Verbindung mit deinem Discord Account auf                                                       |
| /chat \<Chatname>            | Schreibe von Minecraft auf Discord und anders herum ebenfalls                                              |

## Nutzername

<figure><img src="/files/kTVo3llZMC7jtzBcWZSF" alt=""><figcaption><p>Was ist der Nutzername</p></figcaption></figure>


---

# 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://wiki-de.herrtechniker.eu/bungeesystem/module/discord-bot/discord-einstellungen.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.
