Skip to main content

cjda-util

cjda-util is a toolbox for Discord bots built on JDA. It takes care of the parts every bot needs and nobody wants to write twice.

What you get:

Requirements​

WhatVersion
Java21 or newer. cjda-util is compiled for Java 21.
JDA6.7.0. cjda-util brings JDA with it, so you do not need to add it yourself.

cjda-util also brings Javalin 6, Jackson 2, Guava, Apache Commons Text and JSpecify as dependencies.

Add the dependency​

cjda-util is published to EldoNexus.

repositories {
maven("https://eldonexus.de/repository/maven-public/")
}

dependencies {
implementation("de.chojo:cjda-util:3.0.0")
}

Snapshots of the next version are in https://eldonexus.de/repository/maven-snapshots/.

Upgrading from 2.x​

  • The version no longer carries the JDA version. 2.15.1+jda-6.7.0 becomes 3.0.0. This page lists the JDA version each release is built against.
  • Nullness annotations moved from javax.annotation (jsr305) to JSpecify. cjda-util no longer brings jsr305 along. If your code still uses javax.annotation, add com.google.code.findbugs:jsr305 yourself.
  • cjda-util is now licensed under AGPL-3.0-only.

Java modules​

cjda-util is a named module, de.chojo.jdautil. Most bots run on the class path and do not need to care about this.

If your bot is a module itself, require it:

module my.bot {
requires de.chojo.jdautil;
}

cjda-util reads some of your classes with Jackson. Open these packages to com.fasterxml.jackson.databind:

  • the package of your configuration class, if you use Configuration,
  • the package of your own vote payloads, if you add a custom bot list.

Keep your locale files at the root of your resources, as shown in localization.

Javadoc​

The Javadoc is published with every release.