Update dependency net.dv8tion:JDA to v5.4.0 #40

Merged
Skydust merged 1 commits from renovate/all-minor-patch into dev 2025-04-21 08:26:11 +00:00
Collaborator

This PR contains the following updates:

Package Type Update Change
net.dv8tion:JDA dependencies minor 5.3.2 -> 5.4.0

Release Notes

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

v5.4.0: | Interaction callback response and security incidents

Access the created or updated message from interaction replies (#​2798)

You can now use InteractionHook#getCallbackResponse to access the messages created by interaction replies.

@​Override
public void onSlashCommandInteraction(SlashCommandInteractionEvent event) {
  event.reply("React with your favorite emoji")
    .map(hook -> hook.getCallbackResponse().getMessage())
    .flatMap(message -> message.addReaction(emoji))
    .queue();
}

Previously, this could be done using an additional retrieveOriginal request. To reduce requests and improve responsiveness, we recommend preferring this new getter instead.

Guild security incidents (#​2577)

With guild security incidents, you can now be aware when Discord detects raids or spam in direct messages in a guild. These detections are available with Guild#getSecurityIncidentDetections and are updated with GuildUpdateSecurityIncidentDetectionsEvent.

Additionally, you can modify the security incident actions to temporarily pause invites or disable direct messages in your guild. See Guild#modifySecurityIncidents for details.

guild.modifySecurityIncidents(SecurityIncidentActions.enabled(
        // Pause invites for 2 hours
        OffsetDateTime.now().plusHours(2),
        // Disable direct messages for 1 hour
        OffsetDateTime.now().plusHours(1)
)).queue();

// Or disable security incident actions prematurely
guild.modifySecurityIncidents(SecurityIncidentActions.disabled()).queue();

New Features

Changes

Bug Fixes

Full Changelog: https://github.com/discord-jda/JDA/compare/v5.3.2...v5.4.0

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.4.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 | minor | `5.3.2` -> `5.4.0` | --- ### Release Notes <details> <summary>discord-jda/JDA (net.dv8tion:JDA)</summary> ### [`v5.4.0`](https://github.com/discord-jda/JDA/releases/tag/v5.4.0): | Interaction callback response and security incidents ##### Access the created or updated message from interaction replies ([#&#8203;2798](https://github.com/discord-jda/JDA/issues/2798)) You can now use [InteractionHook#getCallbackResponse](https://docs.jda.wiki/net/dv8tion/jda/api/interactions/InteractionHook.html#getCallbackResponse\(\)) to access the messages created by interaction replies. ```java @&#8203;Override public void onSlashCommandInteraction(SlashCommandInteractionEvent event) { event.reply("React with your favorite emoji") .map(hook -> hook.getCallbackResponse().getMessage()) .flatMap(message -> message.addReaction(emoji)) .queue(); } ``` Previously, this could be done using an additional `retrieveOriginal` request. To reduce requests and improve responsiveness, we recommend preferring this new getter instead. ##### Guild security incidents ([#&#8203;2577](https://github.com/discord-jda/JDA/issues/2577)) With guild security incidents, you can now be aware when Discord detects raids or spam in direct messages in a guild. These detections are available with [Guild#getSecurityIncidentDetections](https://docs.jda.wiki/net/dv8tion/jda/api/entities/Guild.html#getSecurityIncidentDetections\(\)) and are updated with [GuildUpdateSecurityIncidentDetectionsEvent](https://docs.jda.wiki/net/dv8tion/jda/api/events/guild/update/GuildUpdateSecurityIncidentDetectionsEvent.html). Additionally, you can modify the security incident actions to temporarily pause invites or disable direct messages in your guild. See [Guild#modifySecurityIncidents](https://docs.jda.wiki/net/dv8tion/jda/api/entities/Guild.html#modifySecurityIncidents\(net.dv8tion.jda.api.entities.guild.SecurityIncidentActions\)) for details. ```java guild.modifySecurityIncidents(SecurityIncidentActions.enabled( // Pause invites for 2 hours OffsetDateTime.now().plusHours(2), // Disable direct messages for 1 hour OffsetDateTime.now().plusHours(1) )).queue(); // Or disable security incident actions prematurely guild.modifySecurityIncidents(SecurityIncidentActions.disabled()).queue(); ``` *** #### New Features - Add interaction callback response handling by [@&#8203;Xirado](https://github.com/Xirado) in https://github.com/discord-jda/JDA/pull/2798 - Add support for guild security incidents by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2577 - Add a way to retrieve users that used super reaction by [@&#8203;MTM123](https://github.com/MTM123) in https://github.com/discord-jda/JDA/pull/2786 - Add Guild#retrieveScheduledEvents by [@&#8203;senseiwells](https://github.com/senseiwells) in https://github.com/discord-jda/JDA/pull/2800 #### Changes - Add missing exceptions when attempting to move entities before selecting by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2797 #### Bug Fixes - Prevent firing voice state update events if member is not cached by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2773 - Fix `FileProxy#withClient` return types by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2698 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.3.2...v5.4.0 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.4.0") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.4.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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTIuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI1Mi4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2IiwibGFiZWxzIjpbXX0=-->
MilaBot added 1 commit 2025-04-21 00:01:43 +00:00
Skydust was assigned by MilaBot 2025-04-21 00:01:43 +00:00
Skydust merged commit 6c1de86ad9 into dev 2025-04-21 08:26:11 +00:00
Skydust deleted branch renovate/all-minor-patch 2025-04-21 08:26:11 +00:00
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#40