A simple yet highly customizable, annotation driven command framework for JDA.
The focus of this framework is strongly oriented towards the reduction of boilerplate code. This goes along with the aim to reduce configuration steps that are needed before startup. Therefore IoC, Dependency Injection and Declarative Programming are the key concepts of this framework. Nevertheless, there is a high level of customization, if wanted, every part of this framework can be replaced by an own implementation.
The core features of this framework are as following:
- Fully annotation driven command declaration
- Argument Parsing based on method signature
- Label shortening (comparable to auto complete)
- Basic implementation of Dependency Injection
- Automatic error resolving
- Automatically generated Help Commands & Error Messages
- Command modification at runtime
- Guild specific settings
- Automatic generation of documentation
- i18n support
Example
The following example will demonstrate how easy it is to write a command:
@CommandController
public class GreetCommand {
@Command("greet")
public void greet(CommandEvent event, Member member) {
event.reply("Hello %s!", member.getAsMention());
}
}
If you want to learn more, check out the Wiki.
You can download the latest version here.
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.Kaktushose</groupId>
<artifactId>jda-commands</artifactId>
<version>VERSION</version>
</dependency>
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.Kaktushose:jda-commands:VERSION'
}
If you think that something is missing and you want to add it yourself, feel free to open a pull request. Please try to keep your code quality as good as mine and stick to the core concepts of this framework.
The following dependencies were used to build this framework: