Update dependency net.dv8tion:JDA to v5.3.0 #33

Merged
Skydust merged 1 commits from renovate/net.dv8tion-jda-5.x into dev 2025-02-03 12:22:12 +00:00
Collaborator

This PR contains the following updates:

Package Type Update Change
net.dv8tion:JDA dependencies minor 5.2.3 -> 5.3.0

Release Notes

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

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: https://github.com/discord-jda/JDA/compare/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>

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.2.3` -> `5.3.0` | --- ### Release Notes <details> <summary>discord-jda/JDA (net.dv8tion:JDA)</summary> ### [`v5.3.0`](https://github.com/discord-jda/JDA/releases/tag/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](https://discord.com/developers/applications) in the installation settings: ![firefox_X9eJoKZ88K](https://github.com/user-attachments/assets/10be4da0-8f99-409a-9931-9bc853d9eb57) Once enabled, you can create user-installable commands, by changing the **integration types**: ```java 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](https://github.com/user-attachments/assets/0535b781-bf76-4aa6-8599-67fee44b6556) The generated link, can now be used to install your application to the authorizing user. ![image](https://github.com/user-attachments/assets/5f6437f5-cf64-497d-a5e9-b122e8f32719) ##### 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](https://docs.jda.wiki/net/dv8tion/jda/api/entities/detached/IDetachableEntity.html#isDetached\(\)), 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](https://docs.jda.wiki/net/dv8tion/jda/api/exceptions/DetachedEntityException.html). #### New Features - Add `Guild#retrieveMemberVoiceState` by [@&#8203;PascalNB](https://github.com/PascalNB) in https://github.com/discord-jda/JDA/pull/2729 - Add support for user-installable apps by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2633 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.2.3...v5.3.0 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.3.0") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.3.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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMjQuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEyNC4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2IiwibGFiZWxzIjpbXX0=-->
MilaBot added 1 commit 2025-02-03 00:01:04 +00:00
Update dependency net.dv8tion:JDA to v5.3.0
All checks were successful
Production deployment / Building and pushing (push) Successful in 2m10s
dd7dfaedaf
Skydust was assigned by MilaBot 2025-02-03 00:01:05 +00:00
Skydust merged commit dd7dfaedaf into dev 2025-02-03 12:22:12 +00:00
Skydust deleted branch renovate/net.dv8tion-jda-5.x 2025-02-03 12:22:12 +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#33