Skip to content

Releases: discord-jda/JDA

v5.0.0-alpha.9

25 Feb 03:20
8cbc267
Compare
Choose a tag to compare

Changelog

This release is a follow up hotfix release for 5.0.0-alpha.6 that fixes issues caused by a bug in Discord (discord/discord-api-docs#4557). We felt it was faster to put out a baindaid than to wait for the fix from Discord's side.

Check out the patch notes on 5.0.0-alpha.6 for the cool new stuff.

New Features

N/A

Changes

Removed

  • Technically receiving ephemeral messages via MESSAGE_CREATE (Thus MessageReceivedEvent) is now no longer supported.
    • To be clear, this would be receiving a MessageReceivedEvent for an ephemeral message that the bot itself sent.

Full Changelog: v5.0.0-alpha.8...v5.0.0-alpha.9

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-alpha.9</version> 
</dependency>

v5.0.0-alpha.8 | alpha.6 Hotfix 2: Electric Boogaloo

23 Feb 02:57
1b1db83
Compare
Choose a tag to compare

Changelog

This release is a follow up hotfix release for 5.0.0-alpha.6 that wasn't completely mitigated by the 5.0.0-alpha.7 hotfix.

Check out the patch notes on 5.0.0-alpha.6 for the cool new stuff.

New Features

N/A

Changes

Removed

N/A

Full Changelog: v5.0.0-alpha.7...v5.0.0-alpha.8

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-alpha.8</version> 
</dependency>

v5.0.0-alpha.7 | Hotfix for alpha.6

22 Feb 01:45
c0742f9
Compare
Choose a tag to compare

Changelog

This release is a hotfix release for 5.0.0-alpha.6. Check out the patch notes on that version for the cool stuff.

New Features

N/A

Changes

Removed

N/A

Full Changelog: v5.0.0-alpha.6...v5.0.0-alpha.7

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-alpha.7</version> 
</dependency>

v5.0.0-alpha.6 | Attachment Options & Breaking Cleanup

20 Feb 21:41
094f41a
Compare
Choose a tag to compare

Changelog

This release includes a variety of breaking changes that were needed to either correctly model how Discord models things in their API or to better set us up for future development.

In this version, we added a new pattern for options on commands. You can now use getOption(name[, fallback], resolver) to easily get any optional arguments for your commands:

public void onSlashCommandInteraction(SlashCommandInteractionEvent event)
{
    //                              name      fallback          resolver
    
    // null if user is not a member of the guild (fallback not used, since option is mapped to a User instance)
    Member member = event.getOption("target", event::getMember, OptionMapping::getAsMember);
    // null if fallback is used (getAsUser cannot be null)
    User user =     event.getOption("target", null            , OptionMapping::getAsUser);
    // null fallback implied
    User nullable = event.getOption("target",                   OptionMapping::getAsUser); // <- implicit fallback null

    // real use-cases:
    int days = event.getOption("days", 7, OptionMapping::getAsInt); // optional ban days
    String reason = event.getOption("reason", "banned by mod", OptionMapping::getAsString); // optional ban reason
}

You can also now flip the iteration direction for MessageChannel.getIterableHistory. A common request as of late, was to get the first messages of a channel, which can now be accomplished by doing channel.getIterableHistory().reverse().takeAsync(1000).

New Features

Changes

  • [Breaking] Change PrivateChannel#getUser to handle API nullability by @oliver276 in #2012
  • [Breaking] Make getDefaultChannel return BaseGuildMessageChannel by @MinnDevelopment in #2016
  • [Semi-Breaking] Dont override latest message id on deletion event by @ishwi in #2013
  • [Breaking] Change some voice Regions and remove VOICE_CHANNEL_REGIONS set by @caneleex in #1962
  • Fix OptionData#setAutoComplete logic. by @portlek in #2003
  • Fix max file size limit in MessageAction by @Xirado in #2017
  • Fix javadoc warnings by @Chew in #1976
  • Fix misspelled ErrorResponse enum value by @Xirado in #2031
  • Fix missing cache cleanup for news/stage/thread channels by @Mitmocc in #2029

Removed

Full Changelog: v5.0.0-alpha.5...v5.0.0-alpha.6

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-alpha.6</version> 
</dependency>

v5.0.0-alpha.5 | Interactions Rework

29 Jan 18:26
374c061
Compare
Choose a tag to compare

Changelog

New Features

Interactions Rework

In this release we completely reworked how interactions work in JDA. The changes are significant, but they also bring with them a lot of improvements and new features. I would highly suggest that users take a look at the migration guide provided in the PR to better understand the changes.

Summary:

  • Reworks of:
    • Slash Commands
    • Select Menus
    • Buttons
  • Introduction of new functionality:
    • User Context Commands
    • Message Context Commands
    • Slash Command Auto Complete
    • An improved hierarchy for Interactions
    • An improved hierarchy for Components

Changes

  • Lots of documentation around threads by @oliver276 in #1838
  • Move requestToSpeak to StageChannel by @MinnDevelopment in #1978
  • ThreadChannel#getTimeCreated is now accurate for Threads created after 2022/01/22 by @caneleex in #1996
  • Limit new thread message count to 50 by @freya022 in #1980
  • ICategorizableChannel#getParentCategoryId now correctly returns null if not in a category by @Sanduhr32 in #1993
  • Change MessageEmbed#getUrl docs to mention representing the title url by @caneleex in #1975
  • Fixes setInvitable in ThreadChannelManager by @oliver276 in #2000

Removed

  • N/A

Full Changelog: v5.0.0-alpha.4...v5.0.0-alpha.5

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-alpha.5</version> 
</dependency>

v5.0.0-alpha.4 | Member Timeouts

10 Jan 04:38
406d49d
Compare
Choose a tag to compare

Changelog

New Features

  • Added support for member timeouts by @caneleex in #1902

Changes

  • Fixed parsing pagination of private archived threads by @Sanduhr32 in #1979
  • Only update CommandData limiting booleans for non-empty additions by @Sanduhr32 in #1963

Removed

  • N/A

Full Changelog: v5.0.0-alpha.3...v5.0.0-alpha.4

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-alpha.4</version>
</dependency>

v5.0.0-alpha.3

24 Dec 22:02
Compare
Choose a tag to compare

Changelog

New Features

Changes

  • Fix parsing of the nullable presence field on Thread Members Update by @caneleex in #1948
  • Transform SelectionMenu magic values into constants by @caneleex in #1944
  • Fix IllegalStateException for OptionType.MENTIONABLE by @averen in #1964
  • Hardcode gateway url by @Xirado in #1957
  • Use bitshifts instead of hexcodes in managers by @caneleex in #1953

Removed

  • N/A

Full Changelog: v5.0.0-alpha.2...v5.0.0-alpha.3

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-alpha.3</version>
</dependency>

v5.0.0-alpha.2

03 Dec 21:03
ae1fabf
Compare
Choose a tag to compare

Changelog

New Contributors

New Features

  • Add missing ErrorResponse values by @Xirado in #1892
  • Add GenericMessageEvent#getThreadChannel() by @rtm516 in #1924
  • Make Guild#moveVoiceMember support AudioChannel instead by @caneleex in #1928
  • add Message.Attachment#getDescription by @caneleex in #1930

Changes

  • Implement parent channel fetching when checking thread permissions by @rtm516 in #1925
  • fix wrong check in GenericMessageEvent#getGuildChannel by @caneleex in #1927
  • Make SelectionMenu#getOptions return an unmodifiable list by @freya022 in #1922
  • Rename ThreadAction to ThreadChannelAction by @caneleex in #1931

Removed

  • Remove GuildManager#setVanityCode by @caneleex in #1933

Full Changelog: v5.0.0-alpha.1...v5.0.0-alpha.2

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-alpha.2</version>
</dependency>

v5.0.0-alpha.1 | Thread Support, Channel Hierarchy Rework

29 Nov 23:07
Compare
Choose a tag to compare

Welcome to the v5 alpha

While we are working through the alpha stage it is expected that things will not be completely hardened yet. Functionality may contain bugs. Docs will be may be missing for new features. Code is still subject to breaking changes. This is the edge of the edge, but this is where the new fun features are to play with. What life without a little danger? 😎

As such, we encourage you to jump in, update your bots, and play with the new feature, but also recognize that v5 is still very much a work-in-progress. We'll do our best to provide a bug free space, but there are additional breaking changes planned for v5, so keep an eye out! 🛠️

Branch Changes

In v4 we had 3 branches:

  • development - In-progress work for v4 releases went here. All PRs were pointed at this.
  • docs/development - Documentation only changes went here. This would get merged into development to keep development history cleaner
  • release - When a new release was made a merge commit was made from development to release. release always showed the code at the time of release for the latest release.

In v5 we are simplifying this:

  • development - This branch is being removed.
  • docs/development - This branch is being removed
  • release - This branch is being removed
  • master - This will be the primary and only branch. It will serve the same purpose that development did in v4, but with a more consistent naming expected by the community. All changes (PRs), regardless of their content, are to be made against this branch.

Additionally, just like with all major-revisions of JDA, the legacy code will be maintained.
As such, the contents of development are currently available on legacy/v4 and will be available there even after development is deleted. Any critical bug fixes that we backport to v4 will be made to legacy/v4.

Version Schema changes:

Starting with v5, we are changing how we handle versions.
The new version schema: <major>.<minor>.<revision>[-<classification>.<classificationRevision>]
Examples:

  • 5.0.0-alpha.1
  • 5.0.0-beta.14
  • 5.1.2

Historically, we versioned JDA as <major>.<minor>.<revision>_<buildVersion> where buildVersion was a continuously incremented number. This led us to have situations where we didn't make an actual release for a long time because developers could just update to the latest <buildVersion>, effectively rendering the normal versioning meaningless. As such, in v5 we have decided to create releases much more often and in doing so we are dropping the <buildVersion> identifier. As a note, these builds where the only part of the version that changed was the buildVersion were JDA's snapshot builds.

Going forward, we are no longer going to be publishing our snapshot builds. This means that not every commit will lead to a repository-published version. The only version that will be published are releases. Releases are when the actual version of JDA has been changed. Anything that is not a release is a snapshot.

Snapshot builds will still be available in 2 ways:

  1. Jitpack
  2. Jenkins CI via JAR downloads

Additionally, the snapshot builds have a slight variant on the new versioning scheme in terms of build assets. For snapshot builds the assets are versioned as <major>.<minor>.<revision>[-<classification>.<classificationRevision>]_<git-commit-7-char-hash>
Examples:

  • 5.0.0-alpha.1_d3fac3k
  • 5.0.0-beta.14_67ylgde
  • 5.1.2_fl1opac

Changelog

New Contributors

New Features

  • JDA now supports threads via the new ThreadChannel construct.
  • StageChannel is now its own type, not an extension of VoiceChannel
  • NewsChannel is now a full-fledge type, not just a subset of TextChannel via isNews()
  • AudioChannel now exist as an interface that contains the shared parts of VoiceChannel and StageChannel. The various parts of the audio system that dealt with channels now deal with AudioChannel instead of explicitly VoiceChannel
  • Introduced "attribute" interfaces that allow interop between concrete channel types:
    • IInviteContainer
    • IPositionableChannel
    • IPermissionContainer
    • ICategorizableChannel
    • etc
  • Introduced GuildChannel#getPermissionContainer to easily get access to an instance of IPermissionContainer for the current channel. In the majority of cases this method will simply return the same channel but cast to IPermissionContainer, but it can return other channels instead, like with ThreadChannel as ThreadChannel doesn't support IPermissionContainer and relies on its parent channel to determine permissions.
    • Additionally, you don't have to use this method. If you know the current GuildChannel instance you have implements IPermissionContainer you can just cast to it. No big deal. This getter is just here for simplicity without casting.
  • Unified channel events:
    We've simplified detecting and handling events for channels by replacing the type-specific events (like TextChannelCreateEvent) with unified events that fire for every channel. You can differentiate between the specific channel types as needed via event.getChannelType()
    • ChannelCreateEvent
    • ChannelUpdateXEvent (e.g: ChannelUpdateNameEvent)
    • ChannelDeleteEvent
  • Type-trimmed Channel Managers
    • ChannelManager
    • attributes
      • IPermissionContainerManager
      • IPositionableChannelManager
      • ICategorizableChannelManager
    • middleman
      • AudioChannelManager
      • BaseGuildMessageChannelManager
    • concrete
      • CategoryManager
      • NewsChannelManager
      • StageChannelManager
      • TextChannelManager
      • ThreadChannelManager
      • VoiceChannelManager

Changed

  • ActivityType.DEFAULT renamed to ActivityType.PLAYING
  • Many permissions were renamed or removed
    • MESSAGE_READ -> Removed. Use VIEW_CHANNEL instead.
    • MESSAGE_WRITE -> MESSAGE_SEND
    • USE_SLASH_COMMANDS -> USE_APPLICATION_COMMANDS
    • MANAGE_EMOTES -> MANAGE_EMOTES_AND_STICKERS
    • USE_PUBLIC_THREADS -> CREATE_PUBLIC_THREADS
    • USE_PRIVATE_THREADS -> CREATE_PRIVATE_THREADS
  • OptionData#addChoice(String, int) -> OptionData#addChoice(String, long)
  • MessageBulkDeleteEvent#getChannel now returns GuildMessageChannel instead of TextChannel
  • WebhookClient#getChannel and WebhookManager#getChannel now both return BaseGuildMessageChannel instead of TextChannel

Removed

  • All deprecated code from v4
  • ChannelManager#getType(). Use ChannelManager#getChannel()#getType()
  • ChannelManager#setNews. Use TextChannelManager#setType or NewsChannelManager#setType
  • ChannelAction#setNews. Use Guild#createNewsChannel
  • NewsChannel related methods removed from TextChannel as NewsChannel is a full-fledged entity now
    • TextChannel#follow -> NewsChannel#follow
    • TextChannel#crosspostMessage -> NewsChannel#crosspostMessage
  • Removed all <Type> specific channel events. Use the new Unified Channel events mentioned above.
    This includes:
    • <Type>ChannelCreateEvent (ex: TextChannelCreateEvent)
    • <Type>ChannelUpdate<Field>Event (ex: TextChannelUpdateNameEvent)
    • <Type>ChannelDeleteEvent (ex: TextChannelDeleteEvent)
  • Removed all <Context>Message<X>Events (ex: GuildMessageReceivedEvent)
    This includes:
    • Generic<Context>MessageEvent (ex: GenericGuildMessageEvent)
    • <Context>MessageReceivedEvent (ex: GuildMessageReceivedEvent)
    • <Context>MessageUpdateEvent (ex: GuildMessageUpdateEvent)
    • <Context>MessageDeleteEvent (ex: GuildMessageDeleteEvent)
    • <Context>MessageEmbedEvent (ex: GuildMessageEmbedEvent)
    • <Context>MessageReaction<X>Event (ex: GuildMessageReactionAddEvent)
    • etc

Full Changelog: v4.4.0...v5.0.0-alpha.1

Installation

With v5 we are finally moving back to Maven Central for our releases. m2.dv8tion.net will continue to host our v4 artifacts until the v4 LTS concludes, but going forward we will be publishing releases to Maven Central. For snapshot builds, please use jitpack.

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-alpha.1</version>
</dependency>

v4.4.0 | Long Term Support (LTS)

26 Nov 19:27
Compare
Choose a tag to compare

This release is long overdue, but with it comes the decision to place v4 into LTS status.

Support for v4 will consist only of bug fixes from this point forward as development focus turns to v5. No additional features, documentation changes, or enhancements will be accepted for v4. Additionally, No changes to support the new GuildIntents.MESSAGE_CONTENT will be backported into v4. This shouldn't be a problem, as v4 handles things well, but it bares mentioning.

The LTS support timer will start once v5 reaches a level of maturity that we feel confident enough in, such that we would recommend transition to it for all developers. It will likely start once v5 hits beta and 6 months after that we will drop support for v4.

Going forward, we will be working on getting the v5.0.0 alpha builds out.

Also, Please take a moment to look at the deprecated features as they will all be removed in v5

New Features

Deprecation

All deprecated features in v4 will be removed in v5!
Detailed javadoc can be found in the deprecated tab of the docs

Installation

The release version is: 4.4.0_350

The latest version is: latest version

Gradle

repositories {
    mavenCentral()
    maven {
        name 'm2-dv8tion'
        url 'https://m2.dv8tion.net/releases'
    }
}
dependencies {
    implementation("net.dv8tion:JDA:4.4.0_350")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>4.4.0_350</version>
</dependency>
<repository>
    <id>dv8tion</id>
    <name>m2-dv8tion</name>
    <url>https://m2.dv8tion.net/releases</url>
</repository>

Changelog

Read more