Skip to content

fix(deps): update dependency net.dv8tion:jda to v5.5.0 #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 21, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
net.dv8tion:JDA 5.1.0 -> 5.5.0 age adoption passing confidence

Release Notes

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

v5.5.0: | Improved voice state cache and file proxies

Changes to voice state cache (#​2835)

Voice states are now cached independently of guild members. JDA can now detect when a member connects or disconnects from an audio channel, even when the member is not currently cached.

With this change, you can technically use MemberCachePolicy.NONE and will still receive voice join / leave events, as long as CacheFlag.VOICE_STATE is enabled.

To reduce the memory footprint, we now only cache voice states if the member is connected to an audio channel. While disconnected, we will not keep the voice state cached, meaning we lose track of muted/deafend state and return an "empty" voice state for Member#getVoiceState.

Improvements to FileProxy (#​2782 and #​2727)

The FileProxy, ImageProxy, and AttachmentProxy now all support downloadAsFileUpload to easily stream a Discord proxies URL to a message.

@​Override
public void onMessageReceived(MessageReceivedEvent event) {
    List<Message.Attachment> attachments = event.getMessage().getAttachments();

    List<FileUpload> uploads = attachments.stream()
        .map(attachment ->
            attachment
                .getProxy()
                .downloadAsFileUpload(attachment.getWidth(), attachment.getHeight()))
        .collect(Collectors.toList());
    
    event.getChannel().sendFiles(uploads).queue();
}

New Features

Changes

Bug Fixes

Full Changelog: discord-jda/JDA@v5.4.0...v5.5.0

Installation

Gradle

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

Maven

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

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.

@&#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 (#​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: discord-jda/JDA@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>

v5.3.2: | Bug fix for PrivateChannel#getName

Overview

Small bug fix release.

Bug Fixes

Full Changelog: discord-jda/JDA@v5.3.1...v5.3.2

Installation

Gradle

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

Maven

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

v5.3.1: | Bug fixes

Overview

Small bug fix release due to API changes regarding user-installed applications.

Bug Fixes

Full Changelog: discord-jda/JDA@v5.3.0...v5.3.1

Installation
Gradle
repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.3.1")
}
Maven
<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.3.1</version> 
</dependency>

v5.3.0: | User-Installable Apps

Overview

After many months of waiting, this release finally adds support for user-installable apps. This will allow you to make use of interactions (and especially commands) anywhere on Discord, by installing the application on a user directly instead of a guild.

Creating User-Installable Apps

To create a user-installable app, you first have to enable the feature in your application dashboard in the installation settings:

firefox_X9eJoKZ88K

Once enabled, you can create user-installable commands, by changing the integration types:

Commands.slash("say", "Makes the bot say what you tell it to")
// Allow the command to be used anywhere (Bot DMs, Guild, Friend DMs, Group DMs)
  .setContexts(InteractionContextType.ALL) 
// Allow the command to be installed on users instead of guilds
  .setIntegrationTypes(IntegrationType.USER_INSTALL) 
  .addOption(STRING, "content", "What the bot should say", true)
Installing to a User

To actually install your app to a user, you can use the generator provided by discord. In the OAuth2 URL Generator, change the integration type to User Install:

firefox_VGe9NK4Xld

The generated link, can now be used to install your application to the authorizing user.

image

Detached Guilds / Roles / Channels / Members

This comes with a few changes to expectations around JDA functionality. Since interactions can now come from anywhere on Discord, some features aren't available in certain contexts.

Some entities can now appear as Detachable Entity, which essentially means that they come from a guild or private channel, that your bot is not directly involved in.

For instance, if a command is installed on a user and that command is used in a guild, your bot is not necessarily a member of that guild. Since the bot is not a member, it only has access to the guild context, that the interaction event provides. Many features such as channels, roles, or members are not accessible without being an actual member of the guild. If you try to use or access anything that isn't accessible, JDA will throw a new DetachedEntityException.

New Features

Full Changelog: discord-jda/JDA@v5.2.3...v5.3.0

Installation

Gradle

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

Maven

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

v5.2.3

Small bug fix release.

Bug Fixes

Changes

Full Changelog: discord-jda/JDA@v5.2.2...v5.2.3

Installation

Gradle

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

Maven

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

v5.2.2

Small bug fix release.

Bug Fixes

Full Changelog: discord-jda/JDA@v5.2.1...v5.2.2

Installation

Gradle

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

Maven

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

v5.2.1

Small bug fix release.

Bug Fixes

Full Changelog: discord-jda/JDA@v5.2.0...v5.2.1

Installation
Gradle
repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.2.1")
}
Maven
<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.2.1</version> 
</dependency>

v5.2.0: | Application emoji and premium buttons

Overview

This release adds some new features for applications. We've also started working on more compliance tests to make contributing and reviewing changes easier.

Premium Buttons (#​2752)

The interaction response replyWithPremiumRequired is being phased out in favor of custom messages with a new button style Button.premium(sku) to upsell specific premium features instead.

You can change your code to a simple reply(content) with this button as a component.

event.reply("This feature is only available for premium users.")
  .addActionRow(Button.primary(SkuSnowflake.fromId(PREMIUM_FEATURE_SKU)))
  .setEphemeral(true)
  .queue();

For more info, see the official Discord Changelog.

Application Emoji (#​2726)

Your bot can now manage emoji with JDA by using JDA#createApplicationEmoji. These emojis can then be used like any other emoji with Emoji.fromCustom(name, id, animated).

New Features
Bug Fixes
Changes

Full Changelog: discord-jda/JDA@v5.1.2...v5.2.0

Installation
Gradle
repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.2.0")
}
Maven
<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.2.0</version> 
</dependency>

v5.1.2: | Message Forwarding and Voice Messages

Overview

This release adds support for new message features.

Forwarding messages (#​2744)

You can now handle forwarded messages using the new message snapshots.

@&#8203;Override
public void onMessageReceived(MessageReceivedEvent event) {
    MessageReference messageReference = event.getMessage().getMessageReference();
    // Forwarded messages have a reference of type FORWARD
    if (messageReference != null && messageReference.getType() == MessageReference.MessageReferenceType.FORWARD) {
        // The content of the forwarded message is provided as a snapshot
        MessageSnapshot snapshot = event.getMessage().getMessageSnapshots().getFirst();
        System.out.println("Received forwarded message with content: " + snapshot.getContentRaw());
    }
}

A bot can also forward a message using Message#fowardTo. Note that a forwarded message cannot contain any additional content.

Voice messages (#​2738)

You can now send voice messages with JDA, by utilizing the new FileUpload#asVoiceMessage method on your audio attachments.

channel.sendFiles(
  FileUpload.fromData(audioFile)
    .asVoiceMessage(MediaType.parse("audio/ogg"), waveform, 10.5) // 10.5 seconds audio/ogg message
).queue();

To create a voice message, you must first determine the audio media type of your voice message and sample a waveform up to 256 bytes. Voice messages require a valid audio/* media type like audio/ogg.

The waveform is used to render the voice message shape in the preview. It must not be an accurate sampling of the actual audio.

New Features

Bug Fixes

Full Changelog: discord-jda/JDA@v5.1.1...v5.1.2

Installation

Gradle

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

Maven

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

v5.1.1: | Small bugfix release

Overview

Small release to fix a few bugs. This fixes an issue that caused voice receive to no longer work as intended in 5.1.0.

Bug Fixes

Full Changelog: discord-jda/JDA@v5.1.0...v5.1.1

Installation
Gradle
repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.1.1")
}
Maven
<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.1.1</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 was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title fix(deps): update dependency net.dv8tion:jda to v5.1.1 fix(deps): update dependency net.dv8tion:jda to v5.1.2 Oct 5, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 945e23e to 52686e7 Compare October 5, 2024 10:52
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 52686e7 to e897984 Compare November 3, 2024 16:48
@renovate renovate bot changed the title fix(deps): update dependency net.dv8tion:jda to v5.1.2 fix(deps): update dependency net.dv8tion:jda to v5.2.0 Nov 3, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from e897984 to c963164 Compare November 10, 2024 19:38
@renovate renovate bot changed the title fix(deps): update dependency net.dv8tion:jda to v5.2.0 fix(deps): update dependency net.dv8tion:jda to v5.2.1 Nov 10, 2024
@renovate renovate bot changed the title fix(deps): update dependency net.dv8tion:jda to v5.2.1 fix(deps): update dependency net.dv8tion:jda to v5.2.2 Dec 27, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from c963164 to 7f3d5f2 Compare December 27, 2024 18:11
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 7f3d5f2 to 769423d Compare January 26, 2025 17:17
@renovate renovate bot changed the title fix(deps): update dependency net.dv8tion:jda to v5.2.2 fix(deps): update dependency net.dv8tion:jda to v5.2.3 Jan 26, 2025
@renovate renovate bot changed the title fix(deps): update dependency net.dv8tion:jda to v5.2.3 fix(deps): update dependency net.dv8tion:jda to v5.3.0 Feb 2, 2025
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 769423d to ee085ce Compare February 2, 2025 17:45
@renovate renovate bot changed the title fix(deps): update dependency net.dv8tion:jda to v5.3.0 fix(deps): update dependency net.dv8tion:jda to v5.3.1 Mar 27, 2025
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from ee085ce to 2cf3663 Compare March 27, 2025 23:36
@renovate renovate bot changed the title fix(deps): update dependency net.dv8tion:jda to v5.3.1 fix(deps): update dependency net.dv8tion:jda to v5.3.2 Apr 5, 2025
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 2cf3663 to f5f36e2 Compare April 5, 2025 13:55
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from f5f36e2 to 0447923 Compare April 20, 2025 18:57
@renovate renovate bot changed the title fix(deps): update dependency net.dv8tion:jda to v5.3.2 fix(deps): update dependency net.dv8tion:jda to v5.4.0 Apr 20, 2025
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 0447923 to 018de85 Compare April 27, 2025 18:05
@renovate renovate bot changed the title fix(deps): update dependency net.dv8tion:jda to v5.4.0 fix(deps): update dependency net.dv8tion:jda to v5.5.0 Apr 27, 2025
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 018de85 to 945a42e Compare May 1, 2025 13:37
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 945a42e to 32bd3f7 Compare May 1, 2025 13:38
@BachErik BachErik merged commit 8d61fad into master May 1, 2025
1 check passed
@BachErik BachErik deleted the renovate/net.dv8tion-jda-5.x branch May 1, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant