Skip to content

Releases: discord-jda/JDA

v5.0.0-beta.20 | Bug fixes and internal refactoring

21 Jan 10:17
472cf52
Compare
Choose a tag to compare

Overview

With this release, we reworked a lot of internals related to how we cache channels. Ideally, you should not notice any difference.

New Features

Changes

Bug Fixes

Full Changelog: v5.0.0-beta.19...v5.0.0-beta.20

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-beta.20")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.20</version> 
</dependency>

v5.0.0-beta.19 | Bug fixes and voice channel status

01 Jan 13:17
db8613d
Compare
Choose a tag to compare

Overview

Smaller release with some bug fixes and added support for voice channel status feature.

Voice Channel Status (#2532)

Bots can now configure the voice channel status, shown when opening a voice channel in full screen mode. This works similarly to a channel topic, but can be configured by everyone who is currently connected to the channel.

The new VOICE_SET_STATUS permission indicates whether a user can change the channel status while they are connected. When a user is not connected to the channel, the MANAGE_CHANNEL permission is required instead (similar to topics).

Note that this feature might be replaced by a new "hang status" in the future, which would instead show on the user rather than the channel.

New Features

Changes

Bug Fixes

Full Changelog: v5.0.0-beta.18...v5.0.0-beta.19

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-beta.19")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.19</version> 
</dependency>

v5.0.0-beta.18

19 Nov 10:37
cfbace6
Compare
Choose a tag to compare

Overview

This release fixes a race-condition in the default rate-limiter implementation that very rarely resulted in an orphaned rate-limit bucket.

Orphan Rate-Limit Buckets (#2585)

Sometimes the cleanup of buckets resulted in an active rate-limit bucket being orphaned. This means that the bucket was continuously trying to execute the same request without updating its state.

This release should resolve that problem, fixing the occasional bug where a 429 response was handled incorrectly.

New Thread Model (#2463)

The default thread model used for the handling of rate-limits has been changed. Instead of using a single scheduled executor, we now make use of an additional elastic pool that automatically scales up and down based on how many buckets run concurrently.

In the previous model, the scheduled executor limited the capabilities by only providing a fixed amount of threads. To handle scaling with larger bots, we simply used 5 threads for each shard. This has been adjusted now to use a shared pool, which scales up and down based on load instead.

Please let us know if you run into any problems with the defaults in your deployments!

New Features

  • Add support for resetting min/max length in TextInput.Builder by @Xirado in #2584

Changes

Bug Fixes

Full Changelog: v5.0.0-beta.17...v5.0.0-beta.18

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-beta.18")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.18</version> 
</dependency>

v5.0.0-beta.17 | Fix webhooks in thread channels

29 Oct 14:10
7bdeea8
Compare
Choose a tag to compare

Overview

This release fixes some issues with webhook executions in thread channels.

Changes

Bug Fixes

Full Changelog: v5.0.0-beta.16...v5.0.0-beta.17

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-beta.17")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.17</version> 
</dependency>

v5.0.0-beta.16 | Webhook Execution and Super Reactions

22 Oct 15:35
649d68e
Compare
Choose a tag to compare

Overview

With this release, we have redesigned a major flaw in our entity constraints. Previously, message instances required a known cached channel instance to be usable. This flaw has been remedied by reworking this implementation to be usable with only a known channel id.

This means, that methods such as message.addReaction(...) or message.pin() can now work for message instances that have no channel object in cache. You can find out if a channel is available on a message instance, by using hasChannel. Adding support for this behavior was necessary, in order to implement webhook executions!

With this change resolved, we can now fully support sending messages through arbitrary webhooks by using WebhookClient.createClient. This webhook client makes use of the JDA rate-limit system and request queue, to properly handle rate-limits for you.

Interactions Hidden Threads

This release also fixes the problem of not receiving interactions in hidden threads, for instance if the thread is a private thread and your bot has not been added yet. This problem was actually caused by JDA expecting a channel instance in cache that was not present, which stopped the interaction from going through.

Discord has added more information about the channel objects in interactions, so we can now properly construct the thread channel instance just in time for the interaction event.

Super Reactions

Your bot can now tell what super-reactions are used. You still cannot send them because the API is too unstable.

Beta Period Almost Done!

We plan to end the beta period for JDA 5.0.0 very soon. There are a few more changes we are thinking of merging first, but the current release already seems very complete. We hope to end the beta period before the end of the year, stay tuned.

New Features

Bug Fixes

Full Changelog: v5.0.0-beta.15...v5.0.0-beta.16

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-beta.16")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.16</version> 
</dependency>

v5.0.0-beta.15 | Bug fixes

30 Sep 17:42
8e62a96
Compare
Choose a tag to compare

Overview

This release fixes a bug introduced by 5.0.0-beta.14.

Bug Fixes

Full Changelog: v5.0.0-beta.14...v5.0.0-beta.15

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-beta.15")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.15</version> 
</dependency>

v5.0.0-beta.14 | Media Channels, Custom Status, LRU Cache

29 Sep 15:16
b3ba5f0
Compare
Choose a tag to compare

Overview

This brings JDA up to date with newly released API features and fixes a few issues.

Support for Custom Status (#2521)

Many years ago, the "Custom Status" feature has been released on Discord, but has since been limited to client users. With a change recently, bots have finally been granted access to set this custom status as well. This, however, is limited to only setting the text value and no emoji.

You can set a custom status using Activity.customStatus(text).

Media Channels (#2516)

Discord is rolling out another new channel type. This time the type is a derivation of forum channels, specifically designed to share media such as images or videos. This release adds support for media channels.

A few places now return the new abstraction IPostContainer, where previously a ForumChannel was used. This abstraction is used to deduplicate and expand the API to handle both media and forum channels equally, as both of these types handle posts (threads with start messages).

LRU Member Cache (#2506)

The member cache has become slightly more powerful by introducing the new LRUMemberCachePolicy. A Least-Recently-Used (LRU) cache keeps members cached based on activity.

Example:

MemberCachePolicy.VOICE                             // Keep in cache if currently in voice (skip LRU and ONLINE)
    .or(MemberCachePolicy.ONLINE)                   // Otherwise, only add to cache if online
    .and(MemberCachePolicy.lru(1000)                // keep 1000 recently active members
        .unloadUnless(MemberCachePolicy.VOICE))     // only unload if they are not in voice

New Features

Changes

Bug Fixes

Full Changelog: v5.0.0-beta.13...v5.0.0-beta.14

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-beta.14")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.14</version> 
</dependency>

v5.0.0-beta.13

06 Aug 14:16
c0582c5
Compare
Choose a tag to compare

Overview

This release includes a few bug fixes and a new FileUpload variant to optimize memory usage when uploading larger files.

Supplier FileUpload (#2508)

With the new FileUpload.fromStreamSupplier, an upload will no longer retain the entire file content in memory. This comes at the cost of having to re-read the source each time.

Example:

FileUpload.fromStreamSupplier("image.png", () -> {
    return new FileInputStream("myimage.png");
});

Each time the request is attempted, which can be more than once due to rate-limit retries, the supplier is used to create a new readable input stream of the file. Once the request successfully writes the entire body, the stream is closed again.

Note that the supplier must always return a new instance or reset the stream accordingly.

Getting Message Author from Reactions (#2499)

The MessageReactionAddEvent now provides the author id of the original message. This can be useful in situations where retrieving the message is too expensive.

New Features

Changes

Bug Fixes

Full Changelog: v5.0.0-beta.12...v5.0.0-beta.13

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-beta.13")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.13</version> 
</dependency>

v5.0.0-beta.12 | Bug fixes

01 Jul 18:45
d2ee6ae
Compare
Choose a tag to compare

Overview

This release fixes a few annoying bugs that were introduced by the username changes.

Bug Fixes

Full Changelog: v5.0.0-beta.11...v5.0.0-beta.12

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-beta.12")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.12</version> 
</dependency>

v5.0.0-beta.11 | Bug fixes and embed from json

19 Jun 13:58
3ebfac1
Compare
Choose a tag to compare

Overview

This release fixes a few issues introduced by the username changes. It also introduces EmbedBuilder.fromData as a way to deserialize embeds from JSON.

There are also some changes to our online presence.

  • The JDA repository has moved to the discord-jda GitHub organization
  • The javadocs moved away from the Jenkins CI host to GitHub pages and can be found at our wiki domain docs.jda.wiki
  • All commits on the master branch will from now on build and upload artifacts using the Artifacts Workflow. Those artifacts stay up for a total of 90 days and can be downloaded as a zip file. All releases will continue to provide artifacts for that specific version indefinitely.

Create Embeds From JSON (#2471)

Using the new EmbedBuilder.fromData factory method, you can now create embed instances from JSON or ETF data.

MessageEmbed embed = new EmbedBuilder().setDescription("Hello, friend").build();

byte[] data = embed.toData().toJson(); // serialize to json data
Files.write(path, json); // store the embed somewhere on disk

DataObject json = DataObject.fromJson(Files.newInputStream(path)); // load the json data
MessageEmbed reconstructed = EmbedBuilder.fromData(json).build(); // reconstruct the same embed using the builder

New Features

Bug Fixes

Full Changelog: v5.0.0-beta.10...v5.0.0-beta.11

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-beta.11")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.11</version> 
</dependency>