Table of Contents

Integrating with your mod

This guide helps you integrate Discord Integration into your Mod.

Gradle Setup

  1. Add my maven repository
repositories {
    maven { url "https://repo.erdbeerbaerlp.de/repository/maven-public/" }
}
  1. Add dependency of DiscordIntegration-Core
dependencies {
    compileOnly 'de.erdbeerbaerlp:dcintegration.common:3.0.7'
    compileOnly group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.1'
}

Adding log4j is optional, but required if you want to use it for logging

Now you are already set up.

Interacting with Discord Integration

To interact with most of Discord Integration, you can call DiscordIntegration.INSTANCE at any time after server has started. This allows you, for example, to send messages to Discord. To get an instance of JDA, use DiscordIntegration.INSTANCE.getJDA()