v5.0.0-beta.1 | Time to update
Overview
We finally made it 🎉 BETA 🎉 ! This concludes the major rewrites and large breaking changes of JDA version 5. With this release, we feel confident that people can rely on updates no longer requiring major rewrites of their codebases in the foreseeable future (praying to the API gods).
There will likely be some effort made to provide a full migration guide for anyone still stuck on version 4. It is recommended to update to version 5 as soon as possible. Version 4 is officially reaching EOL in the first quarter of 2023, and will stop working soon after due to the gateway version 8 being discontinued.
You can join our discord server, where we have a channel called #jda5-changes with a brief changelog for all the breaking changes.
We've also started accepting donations via Open Collective. Any donation are greatly appreciated.
Age-Restricted Commands (#2325)
You can now create NSFW (or age-restricted) commands, which are only usable in age-restricted channels.
Commands.slash("nsfw", "Something nsfw").setNSFW(true)
Channel Ordering (#2320)
The implementation for GuildChannel#compareTo
has been adjusted to support comparing channels of different types. This can be used to figure out the order of channels within the channel list. For instance, if you compare a channel to the category it is in, it will be ordered lower than the category.
This also extends to Guild#getChannels
, which now uses the updated compareTo
implementation for ordering. As such, you can also order a sublist of all channels yourself, by using list.sort()
. This even works with thread channels.
New Features
- Add application_id support for received messages by @Almighty-Satan in #2335
- Add support for age-restricted (nsfw) commands by @MinnDevelopment in #2325
- Implement "ACTIVE_DEVELOPER" UserFlag by @DynxstyGIT in #2326
- Add slash command mentions by @freya022 in #2251
Changes
- Implement thread member pagination by @MinnDevelopment in #2338
- More v5 documentation by @Sanduhr32 in #2296
- Improve GuildChannel#getPosition and Guild#getChannels by @MinnDevelopment in #2320
- Remove archived threads from cache by @MinnDevelopment in #2322
- Forward shutdown reason to awaitStatus exception by @MinnDevelopment in #2268
- Make Widget an interface and move it to it's own file by @Almighty-Satan in #2295
Bug Fixes
- Fix some lock issues by @MinnDevelopment in #2339
- Remove outdated feature check for private threads by @RedDaedalus in #2336
- Fix recursive json object created in mention parsing by @MinnDevelopment in #2334
- Fix handling of empty select menu interactions by @MinnDevelopment in #2330
- Use deep copy for layout components when applying message data by @freya022 in #2236
- Fix JDA#retrieveWebhookById by @MinnDevelopment in #2319
- [Bugfix] Mark ForumChannel as a TopicChannelMixin by @Sanduhr32 in #2317
- Fix MemberCacheViewImpl#getElementsWithRoles and Guild#findMembersWithRoles ignoring the public role by @Almighty-Satan in #2297
- Fix GuildSticker#retrieveOwner by @MinnDevelopment in #2316
- Fix NullPointerException in GuildManagerImpl#addFeatures and GuildManagerImpl#removeFeatures by @Almighty-Satan in #2314
Full Changelog: v5.0.0-alpha.22...v5.0.0-beta.1
Installation
Gradle
repositories {
mavenCentral()
}
dependencies {
implementation("net.dv8tion:JDA:5.0.0-beta.1")
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>5.0.0-beta.1</version>
</dependency>