Skip to content
quanticc edited this page Mar 5, 2019 · 29 revisions

Welcome

Welcome to the Discord4J wiki! Discord4J is a reactive Java wrapper for the official Discord Bot API. This wiki will cover all the basics on reactive programming, how to utilize the Discord4J library effectively, and common examples in reactive and blocking contexts. Feel free to explore the various topics this wiki covers using the links in the sidebar.

Download / Installation

The recommended way to get Discord4J is to use a build automation tool like Maven or Gradle. To setup Maven or Gradle, refer to the documentation for your specific IDE:

Latest stable version: Maven Central

Maven

<dependencies>
  <dependency>
    <groupId>com.discord4j</groupId>
    <artifactId>discord4j-core</artifactId>
    <version>3.0.0</version>
  </dependency>
</dependencies>

Gradle

repositories {
  mavenCentral()
}

dependencies {
  implementation 'com.discord4j:discord4j-core:3.0.0'
}

SBT

libraryDependencies ++= Seq(
  "com.discord4j" % "discord4j-core" % "3.0.0"
)

If you prefer using experimental, "bleeding-edge", unstable builds, refer to Using Jitpack.

Logging

While optional, we do recommend installing and configuring a logging implementation to aide in debugging and provide useful information for day-to-day operations; plus, it's good practice. Discord4J uses Reactor's logging implementation, which is compatible with any SLF4J 1.8+ implementation. We recommend using Logback for maximum flexibility and customization; check our dedicated Logging guide for details.

Maven

<dependencies>
  <dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-classic</artifactId>
    <version>${logback_version}</version>
  </dependency>
</dependencies>

Gradle

dependencies {
  implementation 'ch.qos.logback:logback-classic:$logback_version'
}

SBT

libraryDependencies ++= Seq(
  "ch.qos.logback" % "logback-classic" % s"$logbackVersion"
)
You can’t perform that action at this time.