Skip to main content

Aether

Aether is a set of building blocks for Discord bots written with JDA and jda-commands. It handles the parts many bots need again and again: who may use which command, Discord and Ko-fi purchases, verified mail addresses, Discord login for a web dashboard and JSON views of Discord objects.

Aether does not store anything itself. Wherever data has to be saved, you extend an abstract class or implement an interface and keep the data in your own database.

Requirements​

WhatVersion
Java25 or newer. Aether is compiled for Java 25, because jda-commands 5 needs it.
JDA6. Aether brings JDA 6.7.0.
jda-commands5. Aether brings jda-commands 5.1.1.
Jackson3 (tools.jackson). The modules that read or write JSON bring it.
Javalin7, only for common-web and discord-oauth.

Modules​

Pick the modules you need. Each one brings the modules it builds on.

ArtifactJava moduleWhat it does
commondev.chojo.aether.commonShared parts: user lookup, registries, an event manager with exception handlers, autocomplete helpers, colours. See Common.
supporterdev.chojo.aether.supporterSubscriptions, features and access checks for commands. See Supporter.
kofidev.chojo.aether.kofiTurns Ko-fi webhooks into supporter purchases. See Ko-fi.
mailingdev.chojo.aether.mailingRegisters and verifies mail addresses and sends mails. See Mailing.
discord-oauthdev.chojo.aether.discordoauthDiscord login for a Javalin web app and a small Discord API client. See Discord OAuth.
serializationdev.chojo.aether.serializationJackson serializers that turn guilds, roles, channels and members into JSON. See Serialization.
common-webdev.chojo.aether.commonwebError types and helpers for Javalin. See Common web.
aetherEvery module above in one artifact.

kofi builds on supporter and mailing. discord-oauth builds on common-web. Every other module builds on common.

Add the dependency​

Aether is published to Maven Central with the group dev.chojo.aether. Snapshots are on EldoNexus (https://eldonexus.de/repository/maven-snapshots/).

This example adds the supporter and Ko-fi modules:

repositories {
mavenCentral()
}

dependencies {
implementation("dev.chojo.aether:supporter:2.0.0")
implementation("dev.chojo.aether:kofi:2.0.0")
}

To get everything at once, use dev.chojo.aether:aether:2.0.0.

How the modules fit together​

A typical bot with paid features uses them like this:

  1. Supporter describes your subscriptions and features and checks every command before it runs.
  2. Purchases come in from Discord through the entitlement service and from Ko-fi through the Ko-fi service.
  3. Ko-fi only knows the buyer's mail address. Mailing links that address to a Discord user.
  4. A web dashboard logs users in with Discord OAuth and shows guild data with Serialization.

You can use each module on its own as well.

Where to go next​