v6.0.0-rc.4 | Change to Modals
Pre-release
Pre-release
·
11 commits
to master
since this release
Overview
This release primarily introduces breaking changes to Modals. Discord has finally added support for StringSelectMenu
in Modals, which comes with a minor breaking change in how Modals are created.

Breaking Changes
With the update to Modals, we removed legacy functionality around ActionRow
in Modal
. Instead of using ActionRow.of(...)
, modals make use of the new Label components instead.
Before:
Modal.create("modal", "My Modal")
.addComponents(
ActionRow.of(TextInput.create("input", "My Custom Label", TextInputStyle.SHORT).build()))
.build();
After:
Modal.create("modal", "My Modal")
.addComponents(
Label.of("My Custom Label", TextInput.create("input", TextInputStyle.SHORT).build()))
.build();
With this update, you can now also use StringSelectMenu
in Modals, which can also be added using the Label
component.
Label.of("My Custom Label",
StringSelectMenu.create("menu-custom-id")
.addOption("My option", "option-1")
.build())
When a user submits a modal with a select menu, the values are available in the ModalInteractionEvent
using getValue("menu-custom-id").getAsStringList()
.
New Features
Bug Fixes
- Serialize unique id for text inputs by @MineKing9534 in #2899
- Handle forum channels with missing available_tags field by @MinnDevelopment in #2902
Full Changelog: v6.0.0-rc.3...v6.0.0-rc.4
Installation
Gradle
repositories {
mavenCentral()
}
dependencies {
implementation("net.dv8tion:JDA:6.0.0-rc.4")
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>6.0.0-rc.4</version>
</dependency>