MCPcopy Index your code
hub / github.com/Kaktushose/jda-commands

github.com/Kaktushose/jda-commands @v5.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v5.1.1 ↗ · + Follow
1,387 symbols 4,466 edges 276 files 5 documented · 0% updated todayv5.1.1 · 2026-07-04★ 868 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

JDA-Version Discord Source build & test Release Deployment Codacy Badge license-shield

JDA-Commands

A lightweight, easy-to-use command framework for building Discord bots with JDA with full support for interactions. JDA-Commands goal is to remove any boilerplate code, so you can focus solely on the business logic of your bot - writing bots has never been easier!

Features

  • Simple and intuitive syntax following an annotation-driven and declarative style

  • Built-in support for slash commands, message and action components, embeds, context menus and modals

  • Automatic and customizable type adapting and constraint validation of parameters

  • Expandable executing chain (Middleware API)

  • Multithreaded event handling using VirtualThreads

  • First-hand localization support (via Project Fluent or custom implementation)

  • Usage of jSpecify nullability annotations

  • and many more!

If you want to learn more, go check out the Wiki or Javadocs and join our Discord server.

Example

@Interaction
public class CookieClicker {

    private int counter;

    @Command(value = "cookie clicker", desc = "Play cookie clicker")
    public void onClicker(CommandEvent event) {
        event.with().components("onCookie", "onReset").reply("You've got { $count } cookie(s)!", entry("count", counter));
    }

    @Button(value = "Collect", emoji = "🍪", style = ButtonStyle.SUCCESS)
    public void onCookie(ComponentEvent event) {
        event.reply("You've got { $count } cookie(s)!", entry("count", counter++));
    }

    @Button(value = "Reset", emoji = "🔄", style = ButtonStyle.DANGER)
    public void onReset(ComponentEvent event) {
        count = 0;
        event.reply("You've got { $count } cookie(s)!", entry("count", counter));
    }
}

Components V2

@Command(value = "cookie clicker", desc = "Play cookie clicker")
public void onClicker(CommandEvent event) {
    event.reply(
            Container.of(
                    TextDisplay.of("You've got { $count } cookie(s)!"),
                    ActionRow.of(Component.button("onCookie"), Component.button("onReset"))
            ), entry("count", 1)
    );
}

Download

You can download the latest version here.

Maven

<dependency>
   <groupId>io.github.kaktushose</groupId>
   <artifactId>jda-commands</artifactId>
   <version>5.1.1</version>
</dependency>

Gradle

repositories {
   mavenCentral()
}
dependencies {
   implementation("io.github.kaktushose:jda-commands:5.1.1")
}

Contributing

If you think that something is missing, and you want to add it yourself, feel free to open a pull request. Please consider opening an issue first, so we can discuss if your changes fit to the framework. Also check out the project board to see what we already planned for future releases.

Special thanks to all contributors, especially to @Goldmensch and @lus <3

contributors

Extension points exported contracts — how you extend this code

CustomIdJDAEntity (Interface)
(no doc) [8 implementers]
core/src/main/java/io/github/kaktushose/jdac/definitions/features/CustomIdJDAEntity.java
JDAEntity (Interface)
(no doc) [8 implementers]
core/src/main/java/io/github/kaktushose/jdac/definitions/features/JDAEntity.java
Resolver (Interface)
(no doc) [7 implementers]
core/src/main/java/io/github/kaktushose/jdac/message/resolver/Resolver.java
JDACEvent (Interface)
(no doc) [8 implementers]
core/src/main/java/io/github/kaktushose/jdac/property/events/JDACEvent.java
Description (Interface)
(no doc) [5 implementers]
core/src/main/java/io/github/kaktushose/jdac/definitions/description/Description.java

Core symbols most depended-on inside this repo

entry
called by 149
core/src/main/java/io/github/kaktushose/jdac/message/placeholder/Entry.java
of
called by 135
core/src/main/java/io/github/kaktushose/jdac/embeds/Embed.java
get
called by 132
core/src/main/java/io/github/kaktushose/jdac/message/emoji/EmojiSource.java
of
called by 66
core/src/main/java/io/github/kaktushose/jdac/dispatching/reply/Component.java
name
called by 59
core/src/main/java/io/github/kaktushose/jdac/definitions/interactions/command/CommandDefinition.java
getName
called by 53
core/src/main/java/io/github/kaktushose/jdac/dispatching/events/interactions/AutoCompleteEvent.java
resolve
called by 51
core/src/main/java/io/github/kaktushose/jdac/message/resolver/Resolver.java
put
called by 50
core/src/main/java/io/github/kaktushose/jdac/dispatching/context/KeyValueStore.java

Shape

Method 1,129
Class 214
Interface 39
Enum 4
Function 1

Languages

Java100%
Python1%

Modules by API surface

core/src/test/java/definitions/interactions/options/OptionDataTest.java47 symbols
core/src/main/java/io/github/kaktushose/jdac/embeds/Embed.java34 symbols
core/src/main/java/io/github/kaktushose/jdac/components/internal/AbstractSequencedContainer.java32 symbols
core/src/main/java/io/github/kaktushose/jdac/dispatching/reply/Component.java27 symbols
core/src/main/java/io/github/kaktushose/jdac/JDACBuilder.java27 symbols
testing/src/main/java/io/github/kaktushose/jdac/testing/TestScenario.java26 symbols
core/src/test/java/definitions/interactions/component/ButtonDefinitionTest.java26 symbols
core/src/test/java/definitions/interactions/SlashCommandDefinitionTest.java24 symbols
core/src/main/java/io/github/kaktushose/jdac/dispatching/events/Event.java24 symbols
core/src/test/java/definitions/interactions/AutoCompleteDefinitionTest.java22 symbols
core/src/main/java/io/github/kaktushose/jdac/dispatching/reply/internal/ReplyAction.java21 symbols
testing/src/main/java/io/github/kaktushose/jdac/testing/reply/MessageEventReply.java19 symbols

For agents

$ claude mcp add jda-commands \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact