https://github.com/kaktushose/jda-commands
A declarative, annotation driven interaction framework for JDA
https://github.com/kaktushose/jda-commands
commands discord framework hacktoberfest java jda utility
Last synced: over 1 year ago
JSON representation
A declarative, annotation driven interaction framework for JDA
- Host: GitHub
- URL: https://github.com/kaktushose/jda-commands
- Owner: Kaktushose
- License: apache-2.0
- Created: 2020-08-23T17:35:27.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2025-03-21T20:19:31.000Z (over 1 year ago)
- Last Synced: 2025-03-30T19:05:36.551Z (over 1 year ago)
- Topics: commands, discord, framework, hacktoberfest, java, jda, utility
- Language: Java
- Homepage: https://kaktushose.github.io/jda-commands/wiki
- Size: 9.84 MB
- Stars: 75
- Watchers: 4
- Forks: 13
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/DV8FromTheWorld/JDA#download)
[](https://github.com/Kaktushose/jda-commands/releases/latest)
[](https://github.com/Kaktushose/jda-commands/actions/workflows/ci.yml)
[](https://github.com/Kaktushose/jda-commands/actions/workflows/deploy.yml)
[](https://app.codacy.com/gh/Kaktushose/jda-commands/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[]()
# JDA-Commands
A lightweight, easy-to-use command framework for building Discord bots
with [JDA](https://github.com/DV8FromTheWorld/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, components, context menus and modals
- Automatic and customizable type adapting and constraint validation of parameters
- Expandable executing chain (Middleware API)
- Multithreaded event handling using VirtualThreads
If you want to learn more, go check out the [Wiki](https://kaktushose.github.io/jda-commands/wiki/) or the [Javadocs](https://kaktushose.github.io/jda-commands/javadocs/latest/).
## Example
```java
@Interaction
public class CookieClicker {
private int count;
@Command(value = "cookie clicker", desc = "Play cookie clicker")
public void onClicker(CommandEvent event) {
event.with().components("onCookie", "onReset").reply("You've got %s cookie(s)!", count);
}
@Button(value = "Collect", emoji = "🍪", style = ButtonStyle.SUCCESS)
public void onCookie(ComponentEvent event) {
count++;
event.reply("You've got %s cookie(s)!", count);
}
@Button(value = "Reset", emoji = "🔄", style = ButtonStyle.DANGER)
public void onReset(ComponentEvent event) {
count = 0;
event.reply("You've got %s cookie(s)!", count);
}
}
```
---
## Download
You can download the latest version [here](https://github.com/Kaktushose/jda-commands/releases/latest).
### Maven
```xml
io.github.kaktushose
jda-commands
4.0.0-beta.5
```
### Gradle
```groovy
repositories {
mavenCentral()
}
dependencies {
implementation("io.github.kaktushose:jda-commands:4.0.0-beta.5")
}
```
## 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](https://github.com/users/Kaktushose/projects/1)
to see what we already planned for future releases.
Special thanks to all contributors, especially to [@Goldmensch](https://github.com/Goldmensch) and [@lus](https://github.com/lus) <3
[]([https://badges.pufler.dev](https://github.com/Kaktushose/jda-commands/graphs/contributors))