Skip to content

v4.0.0-beta.4 | Bug Fixes & Enhancements

Latest
Compare
Choose a tag to compare
@Kaktushose Kaktushose released this 12 Jan 20:35
· 4 commits to main since this release
b31d38d

Overview

This is a small followup release for beta.3 which fixes some bugs and has some smaller enhancements

1) New Features

  • N/A

2) Changes

Components from different classes (#147)

You can now attach components that are defined in a different class. Be aware that these components will always be runtime-independent:

event.with().components(MyComponents.class, "onYes", "onNo").reply("Do you want to proceed?");

Message Builder Callback (#156)

You can now access the underlying MessageCreateBuilder of a ConfigurableReply via a callback:

event.with().builder(builder -> builder.setFiles(myFile)).reply("Hello World!");

Improved AutoComplete

Auto complete handlers now also work with method references:

@SlashCommand("favourite fruit")
public void fruitCommand(CommandEvent event, String fruit) {
    event.reply("You've chosen: %s", fruit);
}

@AutoComplete("fruitCommand")
public void onFruitAutoComplete(AutoCompleteEvent event) {
    event.replyChoices(...);
}   

See the javadocs for details

3) Bug Fixes

4) Internal changes

  • jda-commands now uses gradle as its build system and is structured as a multi-module project. This has no effects on the end user

You can find the complete changelog here.

Note

While we are working on a new Wiki check out the JavaDocs which got heavily improved.

Maven

Warning

JDA-Commands is now distributed via Maven Central. Thus, the domain changed to io.github.kaktushose. JitPack is longer required

<dependency>
   <groupId>io.github.kaktushose</groupId>
   <artifactId>jda-commands</artifactId>
   <version>v4.0.0-beta.4</version>
</dependency>

Gradle

repositories {
   mavenCentral()
}
dependencies {
   implementation("io.github.kaktushose:jda-commands:v4.0.0-beta.4")
}