Update dependency net.dv8tion:JDA to v6 #48

Open
MilaBot wants to merge 1 commits from renovate/net.dv8tion-jda-6.x into dev
Collaborator

This PR contains the following updates:

Package Type Update Change
net.dv8tion:JDA dependencies major 5.6.1 -> 6.1.2

Release Notes

discord-jda/JDA (net.dv8tion:JDA)

v6.1.2

Bug Fixes

Full Changelog: https://github.com/discord-jda/JDA/compare/v6.1.1...v6.1.2

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:6.1.2")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>6.1.2</version> 
</dependency>

v6.1.1

New Features

Bug Fixes

Full Changelog: https://github.com/discord-jda/JDA/compare/v6.1.0...v6.1.1

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:6.1.1")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>6.1.1</version> 
</dependency>

v6.1.0: | Modal File Uploads

Overview

This release primarily adds support for file uploads in modals.

Creating a Modal accepting file uploads
Modal.create("modal-id", "Banner Update")
  .addComponents(Label.of("Banner Image", AttachmentUpload.of("banner-file")))
  .build()
Using the uploaded file
@&#8203;Override
public void onModalInteraction(@&#8203;NotNull ModalInteractionEvent event) {
    event.reply("The banner is being updated.").setEphemeral(true).queue();
    
    Message.Attachment attachment = event.getValue("cat-img").getAsAttachmentList().get(0);
    attachment.getProxy()
        .downloadAsIcon()
        .thenCompose(icon -> event.getGuild().getSelfMember().getManager().setBanner(icon).submit())
        .exceptionally(e -> {
            RestAction.getDefaultFailure().accept(e);
            return null;
        });
}

New Features

Full Changelog: https://github.com/discord-jda/JDA/compare/v6.0.0...v6.1.0

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:6.1.0")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>6.1.0</version> 
</dependency>

v6.0.0: | New Component API

Overview

This is the stable release of JDA 6.0.0. To avoid repeating the same information again, please look at the release notes of the release candidates for detailed explanations of the breaking changes and new features.

Release Candidates
  1. v6.0.0-rc.1 New Components
  2. v6.0.0-rc.2 New Pin Pagination API
  3. v6.0.0-rc.3 New pin permissions and removal of bot owned guilds
  4. v6.0.0-rc.4 Change to Modals
  5. v6.0.0-rc.5 Modal Components and Serialization
Migrating to 6.0.0

To help ease the upgrade to JDA 6.0.0, we've provided an OpenRewrite recipe that can automatically refactor parts of your codebase. This will update imports and replace a few method calls with their new equivalents in JDA 6.0.0.

However, not all breaking changes can be handled automatically — for example, code that relied on the mutability of ActionRow will require manual adjustments.

You will also have to update your code for creating Modal instances. Instead of using ActionRow, modals now make use of the Label component. Read the release notes for v6.0.0-rc.4 to learn more.

The OpenRewrite Recipe

Before applying the recipe, make sure you’re using version control (e.g., Git) or back up your project manually. You’ll also need to be using Gradle or Maven to apply the migration.

Gradle

We are using the OpenRewrite Gradle Plugin. Before changing your JDA version in gradle, you can add the rewrite plugin and use the recipe to migrate your code:

plugins {
    id("org.openrewrite.rewrite") version "7.11.0"
}

repositories {
    mavenCentral()
}

dependencies {
    // Your current JDA version before upgrading to 6.0.0
    implementation("net.dv8tion:JDA:5.+")

    rewrite("net.dv8tion:JDA:6.0.0")
    rewrite("org.openrewrite.recipe:rewrite-java-dependencies:1.37.0")
}

rewrite {
    activeRecipe("net.dv8tion.MigrateComponentsV2")
}

Once you configured this plugin, you can use the rewriteDryRun task to generate a git patch in build/reports/rewrite/rewrite.patch to see what the plugin will do with your source code. To apply the changes, either use this patch or use rewriteRun.

After migrating your code, you can then update your JDA version (if the rewrite hasn't done it already) and remove the plugin again.

Maven

We are using the OpenRewrite Maven Plugin. Before changing your JDA version in your pom, you can add the rewrite plugin and use the recipe to migrate your code:

<plugin>
  <groupId>org.openrewrite.maven</groupId>
  <artifactId>rewrite-maven-plugin</artifactId>
  <version>6.13.0</version>
  <configuration>
    <activeRecipes>
      <recipe>net.dv8tion.MigrateComponentsV2</recipe>
    </activeRecipes>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>org.openrewrite.recipe</groupId>
      <artifactId>rewrite-java-dependencies</artifactId>
      <version>1.37.0</version>
    </dependency>
    <dependency>
      <groupId>net.dv8tion</groupId>
      <artifactId>JDA</artifactId>
      <version>6.0.0</version>
    </dependency>
  </dependencies>
</plugin>

Once you configured this plugin, you can use the rewrite:dryRun task to generate a git patch in target/site/rewrite/rewrite.patch to see what the plugin will do with your source code. To apply the changes, either use this patch or use rewrite:run.

After migrating your code, you can then update your JDA version (if the rewrite hasn't done it already) and remove the plugin again.

New Features

Changes

Bug Fixes

Full Changelog: https://github.com/discord-jda/JDA/compare/v5.6.1...v6.0.0

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:6.0.0")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>6.0.0</version> 
</dependency>

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [net.dv8tion:JDA](https://github.com/discord-jda/JDA) | dependencies | major | `5.6.1` -> `6.1.2` | --- ### Release Notes <details> <summary>discord-jda/JDA (net.dv8tion:JDA)</summary> ### [`v6.1.2`](https://github.com/discord-jda/JDA/releases/tag/v6.1.2) #### Bug Fixes - Fix voice state in events when joining channel by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in [#&#8203;2959](https://github.com/discord-jda/JDA/pull/2959) **Full Changelog**: <https://github.com/discord-jda/JDA/compare/v6.1.1...v6.1.2> ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:6.1.2") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>6.1.2</version> </dependency> ``` ### [`v6.1.1`](https://github.com/discord-jda/JDA/releases/tag/v6.1.1) #### New Features - Implement Reading/Writing System Channel Flags by [@&#8203;LaFriska](https://github.com/LaFriska) in [#&#8203;2928](https://github.com/discord-jda/JDA/pull/2928) #### Bug Fixes - Fix `ModalMapping::getAsAttachmentList` if no attachments were submitted by [@&#8203;archer-321](https://github.com/archer-321) in [#&#8203;2941](https://github.com/discord-jda/JDA/pull/2941) - Remove internal class call and replace with local version by [@&#8203;mikomikotaishi](https://github.com/mikomikotaishi) in [#&#8203;2944](https://github.com/discord-jda/JDA/pull/2944) - Fix emtpy edit message builders by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in [#&#8203;2953](https://github.com/discord-jda/JDA/pull/2953) - Add check for valid interface types on ChannelCacheView#ofType by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in [#&#8203;2955](https://github.com/discord-jda/JDA/pull/2955) **Full Changelog**: <https://github.com/discord-jda/JDA/compare/v6.1.0...v6.1.1> ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:6.1.1") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>6.1.1</version> </dependency> ``` ### [`v6.1.0`](https://github.com/discord-jda/JDA/releases/tag/v6.1.0): | Modal File Uploads ### Overview This release primarily adds support for file uploads in modals. ##### Creating a Modal accepting file uploads ```java Modal.create("modal-id", "Banner Update") .addComponents(Label.of("Banner Image", AttachmentUpload.of("banner-file"))) .build() ``` ##### Using the uploaded file ```java @&#8203;Override public void onModalInteraction(@&#8203;NotNull ModalInteractionEvent event) { event.reply("The banner is being updated.").setEphemeral(true).queue(); Message.Attachment attachment = event.getValue("cat-img").getAsAttachmentList().get(0); attachment.getProxy() .downloadAsIcon() .thenCompose(icon -> event.getGuild().getSelfMember().getManager().setBanner(icon).submit()) .exceptionally(e -> { RestAction.getDefaultFailure().accept(e); return null; }); } ``` #### New Features - Add modal file uploads by [@&#8203;freya022](https://github.com/freya022) in [#&#8203;2920](https://github.com/discord-jda/JDA/pull/2920) - Support modifying avatar, banner and bio of current member by [@&#8203;freya022](https://github.com/freya022) in [#&#8203;2915](https://github.com/discord-jda/JDA/pull/2915) - Add missing `Invite.Guild` fields by [@&#8203;freya022](https://github.com/freya022) in [#&#8203;2914](https://github.com/discord-jda/JDA/pull/2914) **Full Changelog**: <https://github.com/discord-jda/JDA/compare/v6.0.0...v6.1.0> ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:6.1.0") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>6.1.0</version> </dependency> ``` ### [`v6.0.0`](https://github.com/discord-jda/JDA/releases/tag/v6.0.0): | New Component API ### Overview This is the stable release of JDA **6.0.0**. To avoid repeating the same information again, please look at the release notes of the release candidates for detailed explanations of the breaking changes and new features. ##### Release Candidates 1. [v6.0.0-rc.1](https://github.com/discord-jda/JDA/releases/tag/v6.0.0-rc.1) **New Components** 2. [v6.0.0-rc.2](https://github.com/discord-jda/JDA/releases/tag/v6.0.0-rc.2) **New Pin Pagination API** 3. [v6.0.0-rc.3](https://github.com/discord-jda/JDA/releases/tag/v6.0.0-rc.3) **New pin permissions and removal of bot owned guilds** 4. [v6.0.0-rc.4](https://github.com/discord-jda/JDA/releases/tag/v6.0.0-rc.4) **Change to Modals** 5. [v6.0.0-rc.5](https://github.com/discord-jda/JDA/releases/tag/v6.0.0-rc.5) **Modal Components and Serialization** ##### Migrating to 6.0.0 To help ease the upgrade to JDA 6.0.0, we've provided an [OpenRewrite recipe](https://github.com/discord-jda/JDA/blob/b3667079444e2a70a6794a1eb1853ebe752c9f9f/src/main/resources/META-INF/rewrite/rewrite.yml) that can automatically refactor parts of your codebase. This will update imports and replace a few method calls with their new equivalents in JDA 6.0.0. However, not all breaking changes can be handled automatically — for example, code that relied on the mutability of `ActionRow` will require manual adjustments. You will also have to update your code for creating `Modal` instances. Instead of using `ActionRow`, modals now make use of the `Label` component. Read the [release notes for v6.0.0-rc.4](https://github.com/discord-jda/JDA/releases/tag/v6.0.0-rc.4) to learn more. ##### The OpenRewrite Recipe Before applying the recipe, make sure you’re using version control (e.g., Git) or back up your project manually. You’ll also need to be using **Gradle** or **Maven** to apply the migration. <details> <summary><strong>Gradle</strong></summary> We are using the [OpenRewrite Gradle Plugin](https://docs.openrewrite.org/reference/gradle-plugin-configuration). Before changing your JDA version in gradle, you can add the rewrite plugin and use the recipe to migrate your code: ```gradle plugins { id("org.openrewrite.rewrite") version "7.11.0" } repositories { mavenCentral() } dependencies { // Your current JDA version before upgrading to 6.0.0 implementation("net.dv8tion:JDA:5.+") rewrite("net.dv8tion:JDA:6.0.0") rewrite("org.openrewrite.recipe:rewrite-java-dependencies:1.37.0") } rewrite { activeRecipe("net.dv8tion.MigrateComponentsV2") } ``` Once you configured this plugin, you can use the `rewriteDryRun` task to generate a git patch in `build/reports/rewrite/rewrite.patch` to see what the plugin will do with your source code. To apply the changes, either use this patch or use `rewriteRun`. After migrating your code, you can then update your JDA version (if the rewrite hasn't done it already) and remove the plugin again. </details> <details> <summary><strong>Maven</strong></summary> We are using the [OpenRewrite Maven Plugin](https://docs.openrewrite.org/reference/rewrite-maven-plugin). Before changing your JDA version in your pom, you can add the rewrite plugin and use the recipe to migrate your code: ```xml <plugin> <groupId>org.openrewrite.maven</groupId> <artifactId>rewrite-maven-plugin</artifactId> <version>6.13.0</version> <configuration> <activeRecipes> <recipe>net.dv8tion.MigrateComponentsV2</recipe> </activeRecipes> </configuration> <dependencies> <dependency> <groupId>org.openrewrite.recipe</groupId> <artifactId>rewrite-java-dependencies</artifactId> <version>1.37.0</version> </dependency> <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>6.0.0</version> </dependency> </dependencies> </plugin> ``` Once you configured this plugin, you can use the `rewrite:dryRun` task to generate a git patch in `target/site/rewrite/rewrite.patch` to see what the plugin will do with your source code. To apply the changes, either use this patch or use `rewrite:run`. After migrating your code, you can then update your JDA version (if the rewrite hasn't done it already) and remove the plugin again. </details> #### New Features - Add support for components V2 by [@&#8203;freya022](https://github.com/freya022) in [#&#8203;2809](https://github.com/discord-jda/JDA/pull/2809) - Add new pinned message pagination by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in [#&#8203;2874](https://github.com/discord-jda/JDA/pull/2874) - Add message pin permission by [@&#8203;freya022](https://github.com/freya022) in [#&#8203;2895](https://github.com/discord-jda/JDA/pull/2895) - Add support for user primary guilds by [@&#8203;mjezek-dev](https://github.com/mjezek-dev) in [#&#8203;2863](https://github.com/discord-jda/JDA/pull/2863) - Add common interface for interactions with a custom ID by [@&#8203;Kaktushose](https://github.com/Kaktushose) in [#&#8203;2778](https://github.com/discord-jda/JDA/pull/2778) - Add support for Label and StringSelectMenu in Modals by [@&#8203;Xirado](https://github.com/Xirado) in [#&#8203;2162](https://github.com/discord-jda/JDA/pull/2162) - Add ComponentSerializer and ComponentDeserializer by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in [#&#8203;2906](https://github.com/discord-jda/JDA/pull/2906) - Add TextInput#of shortcut by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in [#&#8203;2908](https://github.com/discord-jda/JDA/pull/2908) - Add entity selects and text displays in modals by [@&#8203;freya022](https://github.com/freya022) in [#&#8203;2913](https://github.com/discord-jda/JDA/pull/2913) #### Changes - Remove deprecated features by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in [#&#8203;2867](https://github.com/discord-jda/JDA/pull/2867) - Make JDA#getMutualGuilds accept UserSnowflake instead of User objects by [@&#8203;MineKing9534](https://github.com/MineKing9534) in [#&#8203;2877](https://github.com/discord-jda/JDA/pull/2877) - Move modal classes out of the `interactions` package by [@&#8203;freya022](https://github.com/freya022) in [#&#8203;2890](https://github.com/discord-jda/JDA/pull/2890) - Use new routes to (un)pin messages by [@&#8203;freya022](https://github.com/freya022) in [#&#8203;2896](https://github.com/discord-jda/JDA/pull/2896) - Remove bot owned guild endpoints by [@&#8203;freya022](https://github.com/freya022) in [#&#8203;2888](https://github.com/discord-jda/JDA/pull/2888) #### Bug Fixes - Remove port stripping in VoiceServerUpdateHandler by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in [#&#8203;2884](https://github.com/discord-jda/JDA/pull/2884) - Use `DELETE_GUILD` route according to the Discord Docs by [@&#8203;kiLeo13](https://github.com/kiLeo13) in [#&#8203;2875](https://github.com/discord-jda/JDA/pull/2875) - Handle forum channels with missing available\_tags field by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in [#&#8203;2902](https://github.com/discord-jda/JDA/pull/2902) - Remove unnecessary escaping while creating a masked link by [@&#8203;Alf-Melmac](https://github.com/Alf-Melmac) in [#&#8203;2910](https://github.com/discord-jda/JDA/pull/2910) **Full Changelog**: <https://github.com/discord-jda/JDA/compare/v5.6.1...v6.0.0> ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:6.0.0") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>6.0.0</version> </dependency> ``` </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTIuNSIsInVwZGF0ZWRJblZlciI6IjQxLjE3My4xIiwidGFyZ2V0QnJhbmNoIjoiZGV2IiwibGFiZWxzIjpbXX0=-->
MilaBot added 1 commit 2025-10-19 00:02:42 +00:00
Skydust was assigned by MilaBot 2025-10-19 00:02:42 +00:00
MilaBot added 2 commits 2025-11-03 00:02:59 +00:00
MilaBot added 2 commits 2025-11-24 00:06:06 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/net.dv8tion-jda-6.x:renovate/net.dv8tion-jda-6.x
git checkout renovate/net.dv8tion-jda-6.x
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Skydust/JdrBot#48