fix(deps): update dependency net.dv8tion:jda to v5.1.2 #2

Open
Rainnny wants to merge 1 commits from renovate/net.dv8tion-jda-5.x into master
Owner

This PR contains the following updates:

Package Type Update Change
net.dv8tion:JDA compile minor 5.0.0-beta.18 -> 5.1.2

Release Notes

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

v5.1.2: | Message Forwarding and Voice Messages

Compare Source

Overview

This release adds support for new message features.

Forwarding messages (#​2744)

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

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

Compare Source

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

v5.1.0: | Voice Gateway v8

Compare Source

Overview

This release updates the implementation of the voice gateway to API version 8 (previously 4). Previous versions will be incompatible coming November 18, 2024. This includes adding a new dependency on tink, to support the new encryption modes.

Additionally, the MessageEmbedEvent has been removed. Discord sends standard update events for embed loading now, this event can no longer be supported.

New Features

Changes

Bug Fixes

Full Changelog: https://github.com/discord-jda/JDA/compare/v5.0.2...v5.1.0

Installation

Gradle

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

Maven

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

v5.0.2: | Single time event listener

Compare Source

Overview

This release includes some bug fixes as well as a new event listener feature to add a one-time-use event listener.

Once Event Listener (#​2683)

A common problem that developers run into, is "waiting" for a specific event in the context of some command. For instance, waiting for a user to add a reaction or reply with a message in response to some prompt.

This can now be achieved using the new listenOnce event listener:

// listen for a message event
jda.listenOnce(MessageReceivedEvent.class)
    // filter for specific event
    .filter(event -> event.getChannel().equals(channel))
    .filter(event -> event.getAuthor().equals(user))
    // handle timeout
    .timeout(timeout, () -> hook.editOriginal("Timeout!").queue())
    // subscribe to first event that matches filters
    .subscribe(event -> {
        hook.editOriginal("You sent: " + event.getMessage().getContentRaw()).queue();
    });

New Features

Changes

Bug Fixes

Full Changelog: https://github.com/discord-jda/JDA/compare/v5.0.1...v5.0.2

Installation

Gradle

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

Maven

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

v5.0.1: | Hotfix shard manager thread handling

Compare Source

Overview

Small hotfix release, fixes problem with default thread config for DefaultShardManager. This caused requests to fail if a shard is stopped or restarted.

Bug Fixes

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

Installation

Gradle

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

Maven

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

v5.0.0: | End of beta phase

Compare Source

The Long Awaited Stabilization

After almost 3 years of refactoring and polishing, the stabilization of JDA 5.0.0 is here. If you have been following along, not much has changed since the latest beta release.

If you have somehow avoided updating to a beta release since 2021, here is a list of the most noteworthy additions, changes, and bug fixes since 4.4.0.

You can also use our Migration Guide to help you update to the latest version of JDA 5. This guide also includes the most important changes you need to consider.

Interactions / Application Features

Discord has further improved the capabilities of applications with new types of interactions. This major release of JDA adds support for these features, coming with some restructuring to properly accomodate the new types.

We've renamed interaction events to a more consistent naming scheme:

  • SlashCommandEvent becomes SlashCommandInteractionEvent
  • ButtonClickEvent becomes ButtonInteractionEvent

Similarly, we've renamed component types slightly:

  • SelectionMenu is now StringSelectMenu, while adding a new EntitySelectMenu
  • What was previously called Component has now been renamed to ActionComponent and ItemComponent, allowing us to introduce Component as an abstraction over both Button and ActionRow (which is now a LayoutComponent). The new Component interface is now an abstraction over both ItemComponent and LayoutComponent.

To learn more about interactions in JDA 5, take a look at our Interactions Wiki Guide.

Channel Type Rework

We've refactored the channel types and usages in JDA to be more maintainable. Each type of channel now directly maps to a specific channel interface, unlike before where VoiceChannel was used for both stage and voice type channels.
Instead there are now concrete interfaces for each type, such as NewsChannel, StageChannel, ForumChannel, etc.

The channel type hierarchy has been further refined, by introducing higher level abstractions to represent the features of multiple channel types:

As well as more specific features or attributes of channels:

To properly maintain these many different channel types and make them easy to use, we've also introduced new union types to encompass multiple channels into a simple common union type. This replaces the old getTextChannel()/getVoiceChannel() getters on events with getChannel().asTextChannel(). However, you can also use the standard features of the unions directly. For instance, a MessageChannelUnion allows to send messages and these specialization methods:

MessageChannelUnion channel = event.getChannel();
channel.sendMessage("hello").queue();
if (channel.getType() == TEXT) {
  channel.asTextChannel().getManager().setTopic("test topic").queue();
}

Cache access has also seen some improvement, by introducing a new getChannelById(Class, long) method, allowing to just get a MessageChannel without worrying about the concrete type.

GuildMessageChannel channel = guild.getChannelById(GuildMessageChannel.class, 125227483518861312L);
channel.sendMessage("Hello general chat!").queue();

Learn more about the channel rework in Channel Rework.

Message Features

We've refactored our message sending interfaces to be more consistent, by abstracting MessageAction, MessageBuilder, and ReplyAction into shared interfaces MessageCreateRequest and MessageEditRequest. This makes all message sending code consistent. We recommend to simply chain your builder-like code directly on send messages:

channel.sendMessage("Hello World")
  .setComponents(ActionRow.of(button1, button2))
  .setEmbeds(embed1, embed2)
  .setFiles(files)
  .queue();

However, if you need to use builders, we've introduced MessageEditBuilder and MessageCreateBuilder to replace the old MessageBuilder utility. You can also now use SplitUtil to easily divide message content into multiple messages.

To support file descriptions and reduce the number of sendFile overloads, we've also introduced a new FileUpload type that unifies all attachments into a single type.

FileUpload file = FileUpload.fromData(new File("myFile.png"), "image.png")
  .setDescription("this is my alt text for screenreaders, allowing to make accessible images in your messages!");
channel.sendFiles(file).queue();

Learn more about the changes to message sending in Message Send/Edit Rework.

Emojis and Stickers

In JDA 5, we have decided to unify all emoji types into a consistent type structure:

These new emoji types replace the duplication of ReactionEmote and Activity.Emoji.

Stickers have also been refactored in a similar way, making a clear distinction between stickers found in messages and guild settings:

  • Sticker, a top-level abstraction of all sticker types
  • StickerItem, stickers found in messages
  • RichSticker, stickers with more information that is usually omitted for messages (sticker items)
  • StandardSticker, rich stickers provided by nitro instead of guilds
  • GuildSticker, rich stickers provided in guilds
  • StickerUnion, adding type casting

Learn more about the changes to emojis and stickers in Sticker and Emoji Rework.

Installation

All future JDA releases will be distributed through maven central. You no longer need to use jcenter() in your dependency manager.

Gradle

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

Maven

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

Changelog (5.0.0-beta.24 -> 5.0.0)

The changes since the latest beta release to this release.

Changelog (4.4.0 -> 5.0.0)

Note that this changelog is a linear history of changes. This means some earlier changes have already been superseded or refined in more recent changes. This changelog is slightly compressed to remove unimportant changes, you can see the full list of commits here.

Thank you all for contributing!

New Features

New feature additions since 4.4.0

Breaking Changes

Breaking changes since 4.4.0

Other Changes

Other noteworthy changes since 4.4.0

Bug Fixes

Bugs fixed since 4.4.0

v5.0.0-beta.24: | Bug fixes and entitlement types

Compare Source

Overview

This is a small bugfix release, including some missing features for premium app entitlements.

Additional Entitlement Features (#​2667)

This release adds support for test entitlements and consumed entitlements.

An entitlement can be consumed, marking it as already used. This can be useful for one-time entitlements, which are consumed on use.

public boolean hasEntitlement(long skuId, List<Entitlement> entitlements) {
  return entitlements.stream().anyMatch(e -> e.getSkuIdLong() == skuId && !e.isConsumed());
}
public void consumeEntitlement(long skuId, List<Entitlement> entitlements) {
  entitlements.stream()
    .filter(e -> e.getSkuIdLong() == skuId && !e.isConsumed())
    .findFirst()
    .ifPresent(entitlement -> entitlement.consume().queue());
}

New Features

Changes

Bug Fixes

Full Changelog: https://github.com/discord-jda/JDA/compare/v5.0.0-beta.23...v5.0.0-beta.24

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.24</version> 
</dependency>

v5.0.0-beta.23: | Message Polls

Compare Source

Overview

This release includes an updated README, please let us know if you spot any issues with it!

Polls (#​2649)

Discord has recently released a new feature on their platform to start and vote in polls. These polls can now be sent in messages:

channel.sendMessage("Hello guys! Check my poll:")
  .setPoll(
    MessagePollData.builder("Which programming language is better?")
      .addAnswer("Java", Emoji.fromFormatted("<:java:1006323566314274856>"))
      .addAnswer("Kotlin", Emoji.fromFormatted("<:kotlin:295940257797636096>"))
      .build())
  .queue()

The poll automatically expires after a set duration, configurable in the MessagePollBuilder using setDuration. A poll can also be ended manually using endPoll or endPollById.

You can check the poll votes on a message using the new Message#getPoll:

MessagePoll poll = message.getPoll();
for (MessagePoll.Answer answer : poll.getAnswers()) {
  System.out.printf("Poll Answer %s has %d votes\n", answer.getText(), answer.getVotes());
}
!NOTE]
The votes for polls are eventually consistent and need to be recounted after the poll ends. You can check whether the votes are validated using [MessagePoll#isFinalizedVotes](https://docs.jda.wiki/net/dv8tion/jda/api/entities/messages/MessagePoll.html#isFinalizedVotes\(\)).

New Features

Changes

Bugs Fixes

Full Changelog: https://github.com/discord-jda/JDA/compare/v5.0.0-beta.22...v5.0.0-beta.23

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.23</version> 
</dependency>

v5.0.0-beta.22: | Bulk ban, premium apps, bug fixes

Compare Source

Overview

This release adds some newer API features, like premium app subscriptions, bot banners, and bulk banning users.

Besides new features, this release also includes improved errors and bug fixes.

Premium App Subscriptions (#​2583)

If your bot is eligible for monetization, you can now use JDA to handle entitlements in interactions to restrict features. With event.replyWithPremiumRequired(), you can upsell a premium subscription to a user:

b306d1ccc7205d2291f4535f912a790e

Read more about entitlements and premium app subscriptions in the Discord Developer Docs.

Bulk Ban (#​2630)

You can now ban up to 200 users in one request using guild.ban(users, messageDeleteTimeframe).

This endpoint has a few quirks to keep in mind:

  • The BulkBanResponse includes failed users and banned users
  • If a user was already banned, they are in the failed users
  • If you don't have permissions to ban a user (higher role / owner), they also appear in failed users
  • The self user also appears in failed users
  • If all users "failed" you get an error response instead

New Features

Changes

Bug Fixes

Full Changelog: https://github.com/discord-jda/JDA/compare/v5.0.0-beta.21...v5.0.0-beta.22

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.22</version> 
</dependency>

v5.0.0-beta.21: | Bug fixes and enforced nonce on messages

Compare Source

Overview

This release fixes a few bugs but also implements a new behavior on message sending.

With the new enforce nonce behavior, messages will no longer be duplicated due to timeouts or discord outages. This means, any message request will now send an automatically generated nonce. You can still set a custom nonce using setNonce, but you should make sure that this nonce is unique. If you previously relied on this setter, ensure that you are not sending duplicated nonce values.

New Features

Changes

Bug Fixes

Full Changelog: https://github.com/discord-jda/JDA/compare/v5.0.0-beta.20...v5.0.0-beta.21

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.21</version> 
</dependency>

v5.0.0-beta.20: | Bug fixes and internal refactoring

Compare Source

Overview

With this release, we reworked a lot of internals related to how we cache channels. Ideally, you should not notice any difference.

New Features

Changes

Bug Fixes

Full Changelog: https://github.com/discord-jda/JDA/compare/v5.0.0-beta.19...v5.0.0-beta.20

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.20</version> 
</dependency>

v5.0.0-beta.19: | Bug fixes and voice channel status

Compare Source

Overview

Smaller release with some bug fixes and added support for voice channel status feature.

Voice Channel Status (#​2532)

Bots can now configure the voice channel status, shown when opening a voice channel in full screen mode. This works similarly to a channel topic, but can be configured by everyone who is currently connected to the channel.

The new VOICE_SET_STATUS permission indicates whether a user can change the channel status while they are connected. When a user is not connected to the channel, the MANAGE_CHANNEL permission is required instead (similar to topics).

Note that this feature might be replaced by a new "hang status" in the future, which would instead show on the user rather than the channel.

New Features

Changes

Bug Fixes

Full Changelog: https://github.com/discord-jda/JDA/compare/v5.0.0-beta.18...v5.0.0-beta.19

Installation

Gradle

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

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.19</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) | compile | minor | `5.0.0-beta.18` -> `5.1.2` | --- ### Release Notes <details> <summary>discord-jda/JDA (net.dv8tion:JDA)</summary> ### [`v5.1.2`](https://github.com/discord-jda/JDA/releases/tag/v5.1.2): | Message Forwarding and Voice Messages [Compare Source](https://github.com/discord-jda/JDA/compare/v5.1.1...v5.1.2) ### Overview This release adds support for new message features. ##### Forwarding messages ([#&#8203;2744](https://github.com/discord-jda/JDA/issues/2744)) You can now handle forwarded messages using the new [message snapshots](https://docs.jda.wiki/net/dv8tion/jda/api/entities/Message.html#getMessageSnapshots\(\)). ```java @&#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`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/Message.html#forwardTo\(net.dv8tion.jda.api.entities.channel.middleman.MessageChannel\)). Note that a forwarded message cannot contain any additional content. ##### Voice messages ([#&#8203;2738](https://github.com/discord-jda/JDA/issues/2738)) You can now send voice messages with JDA, by utilizing the new [`FileUpload#asVoiceMessage`](https://docs.jda.wiki/net/dv8tion/jda/api/utils/FileUpload.html#asVoiceMessage\(okhttp3.MediaType,byte%5B%5D,double\)) method on your audio attachments. ```java 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 - Add support for message forwarding by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2744 - Support sending voice messages by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2738 #### Bug Fixes - Fix ScheduledEventManagerImpl::setStatus by [@&#8203;raul1ro](https://github.com/raul1ro) in https://github.com/discord-jda/JDA/pull/2743 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.1.1...v5.1.2 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.1.2") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.1.2</version> </dependency> ``` ### [`v5.1.1`](https://github.com/discord-jda/JDA/releases/tag/v5.1.1): | Small bugfix release [Compare Source](https://github.com/discord-jda/JDA/compare/v5.1.0...v5.1.1) ### 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 - Remove extension from received audio packets by [@&#8203;davidffa](https://github.com/davidffa) in https://github.com/discord-jda/JDA/pull/2721 - Remove `@CheckReturnValue` from Once.Builder.subscribe by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2730 - Fix parsing error for AutoModResponse by [@&#8203;StasiumDev](https://github.com/StasiumDev) in https://github.com/discord-jda/JDA/pull/2728 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.1.0...v5.1.1 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.1.1") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.1.1</version> </dependency> ``` ### [`v5.1.0`](https://github.com/discord-jda/JDA/releases/tag/v5.1.0): | Voice Gateway v8 [Compare Source](https://github.com/discord-jda/JDA/compare/v5.0.2...v5.1.0) ### Overview This release updates the implementation of the voice gateway to API version 8 (previously 4). Previous versions will be incompatible coming November 18, 2024. This includes adding a new dependency on [tink](https://github.com/tink-crypto/tink-java), to support the new encryption modes. Additionally, the `MessageEmbedEvent` has been removed. Discord sends standard update events for embed loading now, this event can no longer be supported. #### New Features - Add new message and embed types by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2716 #### Changes - Upgrade to voice gateway v8 by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2717 - Remove MessageEmbedEvent by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2720 #### Bug Fixes - Handle guild stickers array as optional in EntityBuilder#createGuild by [@&#8203;Xirado](https://github.com/Xirado) in https://github.com/discord-jda/JDA/pull/2714 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.0.2...v5.1.0 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.1.0") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.1.0</version> </dependency> ``` ### [`v5.0.2`](https://github.com/discord-jda/JDA/releases/tag/v5.0.2): | Single time event listener [Compare Source](https://github.com/discord-jda/JDA/compare/v5.0.1...v5.0.2) ### Overview This release includes some bug fixes as well as a new event listener feature to add a one-time-use event listener. ##### Once Event Listener ([#&#8203;2683](https://github.com/discord-jda/JDA/issues/2683)) A common problem that developers run into, is "waiting" for a specific event in the context of some command. For instance, waiting for a user to add a reaction or reply with a message in response to some prompt. This can now be achieved using the new [listenOnce](https://docs.jda.wiki/net/dv8tion/jda/api/JDA.html#listenOnce\(java.lang.Class\)) event listener: ```java // listen for a message event jda.listenOnce(MessageReceivedEvent.class) // filter for specific event .filter(event -> event.getChannel().equals(channel)) .filter(event -> event.getAuthor().equals(user)) // handle timeout .timeout(timeout, () -> hook.editOriginal("Timeout!").queue()) // subscribe to first event that matches filters .subscribe(event -> { hook.editOriginal("You sent: " + event.getMessage().getContentRaw()).queue(); }); ``` #### New Features - Add `TeamMember.RoleType` by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2703 - Add abstract `createCopy` method in `SelectMenu` by [@&#8203;Kaktushose](https://github.com/Kaktushose) in https://github.com/discord-jda/JDA/pull/2684 - Add `JDA#listenOnce` by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2683 - Add support for profile automod by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2580 #### Changes - Expand list of retried http error codes by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2710 - Update to Jackson 2.17.2 by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2695 #### Bug Fixes - Fix deserialization of interaction components by [@&#8203;WitchBoo](https://github.com/WitchBoo) in https://github.com/discord-jda/JDA/pull/2711 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.0.1...v5.0.2 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.0.2") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.0.2</version> </dependency> ``` ### [`v5.0.1`](https://github.com/discord-jda/JDA/releases/tag/v5.0.1): | Hotfix shard manager thread handling [Compare Source](https://github.com/discord-jda/JDA/compare/v5.0.0...v5.0.1) ### Overview Small hotfix release, fixes problem with default thread config for `DefaultShardManager`. This caused requests to fail if a shard is stopped or restarted. #### Bug Fixes - Fix automatic shutdown for elastic pool by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2704 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.0.0...v5.0.1 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.0.1") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.0.1</version> </dependency> ``` ### [`v5.0.0`](https://github.com/discord-jda/JDA/releases/tag/v5.0.0): | End of beta phase [Compare Source](https://github.com/discord-jda/JDA/compare/v5.0.0-beta.24...v5.0.0) ### The Long Awaited Stabilization After almost 3 years of refactoring and polishing, the stabilization of JDA 5.0.0 is here. If you have been following along, not much has changed since the latest beta release. If you have somehow avoided updating to a beta release since 2021, here is a list of the most noteworthy additions, changes, and bug fixes since 4.4.0. You can also use our [**Migration Guide**](https://jda.wiki/introduction/migration-v4-v5/) to help you update to the latest version of JDA 5. This guide also includes the most important changes you need to consider. ##### Interactions / Application Features Discord has further improved the capabilities of applications with new types of interactions. This major release of JDA adds support for these features, coming with some restructuring to properly accomodate the new types. We've renamed interaction events to a more consistent naming scheme: - `SlashCommandEvent` becomes `SlashCommandInteractionEvent` - `ButtonClickEvent` becomes `ButtonInteractionEvent` Similarly, we've renamed component types slightly: - `SelectionMenu` is now [`StringSelectMenu`](https://docs.jda.wiki/net/dv8tion/jda/api/interactions/components/selections/StringSelectMenu.html), while adding a new [`EntitySelectMenu`](https://docs.jda.wiki/net/dv8tion/jda/api/interactions/components/selections/EntitySelectMenu.html) - What was previously called `Component` has now been renamed to `ActionComponent` and `ItemComponent`, allowing us to introduce `Component` as an abstraction over both `Button` and `ActionRow` (which is now a `LayoutComponent`). The new [`Component`](https://docs.jda.wiki/net/dv8tion/jda/api/interactions/components/Component.html) interface is now an abstraction over both [`ItemComponent`](https://docs.jda.wiki/net/dv8tion/jda/api/interactions/components/ItemComponent.html) and [`LayoutComponent`](https://docs.jda.wiki/net/dv8tion/jda/api/interactions/components/LayoutComponent.html). To learn more about interactions in JDA 5, take a look at our [Interactions Wiki Guide](https://jda.wiki/using-jda/interactions/). ##### Channel Type Rework We've refactored the channel types and usages in JDA to be more maintainable. Each type of channel now directly maps to a specific channel interface, unlike before where `VoiceChannel` was used for both stage and voice type channels.\ Instead there are now concrete interfaces for each type, such as `NewsChannel`, `StageChannel`, `ForumChannel`, etc. The channel type hierarchy has been further refined, by introducing higher level abstractions to represent the features of multiple channel types: - [`Channel`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/channel/Channel.html) - [`GuildChannel`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/channel/middleman/GuildChannel.html) - [`MessageChannel`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/channel/middleman/MessageChannel.html) and [`GuildMessageChannel`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/channel/middleman/GuildMessageChannel.html) - [`AudioChannel`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/channel/middleman/AudioChannel.html) As well as more specific features or attributes of channels: - [`IPermissionContainer`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/channel/attribute/IPermissionContainer.html) - [`IPositionableChannel`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/channel/attribute/IPositionableChannel.html) - [`IThreadContainer`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/channel/attribute/IThreadContainer.html) - [`IWebhookContainer`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/channel/attribute/IWebhookContainer.html) - etc. To properly maintain these many different channel types and make them easy to use, we've also introduced new union types to encompass multiple channels into a simple common union type. This replaces the old `getTextChannel()`/`getVoiceChannel()` getters on events with `getChannel().asTextChannel()`. However, you can also use the standard features of the unions directly. For instance, a [`MessageChannelUnion`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/channel/unions/MessageChannelUnion.html) allows to send messages and these specialization methods: ```java MessageChannelUnion channel = event.getChannel(); channel.sendMessage("hello").queue(); if (channel.getType() == TEXT) { channel.asTextChannel().getManager().setTopic("test topic").queue(); } ``` Cache access has also seen some improvement, by introducing a new [`getChannelById(Class, long)`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/channel/attribute/IGuildChannelContainer.html#getChannelById\(java.lang.Class,long\)) method, allowing to just get a `MessageChannel` without worrying about the concrete type. ```java GuildMessageChannel channel = guild.getChannelById(GuildMessageChannel.class, 125227483518861312L); channel.sendMessage("Hello general chat!").queue(); ``` Learn more about the channel rework in [Channel Rework](https://jda.wiki/introduction/migration-v4-v5/#channel-rework). ##### Message Features We've refactored our message sending interfaces to be more consistent, by abstracting `MessageAction`, `MessageBuilder`, and `ReplyAction` into shared interfaces [`MessageCreateRequest`](https://docs.jda.wiki/net/dv8tion/jda/api/utils/messages/MessageCreateRequest.html) and [`MessageEditRequest`](https://docs.jda.wiki/net/dv8tion/jda/api/utils/messages/MessageEditRequest.html). This makes all message sending code consistent. We recommend to simply chain your builder-like code directly on send messages: ```java channel.sendMessage("Hello World") .setComponents(ActionRow.of(button1, button2)) .setEmbeds(embed1, embed2) .setFiles(files) .queue(); ``` However, if you need to use builders, we've introduced [MessageEditBuilder](https://docs.jda.wiki/net/dv8tion/jda/api/utils/messages/MessageEditBuilder.html) and [MessageCreateBuilder](https://docs.jda.wiki/net/dv8tion/jda/api/utils/messages/MessageCreateBuilder.html) to replace the old `MessageBuilder` utility. You can also now use [`SplitUtil`](https://docs.jda.wiki/net/dv8tion/jda/api/utils/SplitUtil.html) to easily divide message content into multiple messages. To support file descriptions and reduce the number of sendFile overloads, we've also introduced a new [`FileUpload`](https://docs.jda.wiki/net/dv8tion/jda/api/utils/FileUpload.html) type that unifies all attachments into a single type. ```java FileUpload file = FileUpload.fromData(new File("myFile.png"), "image.png") .setDescription("this is my alt text for screenreaders, allowing to make accessible images in your messages!"); channel.sendFiles(file).queue(); ``` Learn more about the changes to message sending in [Message Send/Edit Rework](https://jda.wiki/introduction/migration-v4-v5/#message-sendedit-rework). ##### Emojis and Stickers In JDA 5, we have decided to unify all emoji types into a consistent type structure: - [`Emoji`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/emoji/Emoji.html), a top-level interface representing all emoji as well as a type discriminator with [`Emoji#getType`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/emoji/Emoji.html#getType\(\)) - [`UnicodeEmoji`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/emoji/UnicodeEmoji.html), standard unicode emoji such as 🤔 - [`CustomEmoji`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/emoji/CustomEmoji.html), custom emoji found in messages, like `<:minn:245267426227388416>` - [`RichCustomEmoji`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/emoji/RichCustomEmoji.html), emoji with more information such as owner, accessible through the guild settings. - [`EmojiUnion`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/emoji/EmojiUnion.html), adding type casting for things like [`MessageReaction#getEmoji`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/MessageReaction.html#getEmoji\(\)) These new emoji types replace the duplication of `ReactionEmote` and `Activity.Emoji`. Stickers have also been refactored in a similar way, making a clear distinction between stickers found in messages and guild settings: - [`Sticker`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/sticker/Sticker.html), a top-level abstraction of all sticker types - [`StickerItem`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/sticker/StickerItem.html), stickers found in messages - [`RichSticker`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/sticker/RichSticker.html), stickers with more information that is usually omitted for messages (sticker items) - [`StandardSticker`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/sticker/StandardSticker.html), rich stickers provided by nitro instead of guilds - [`GuildSticker`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/sticker/GuildSticker.html), rich stickers provided in guilds - [`StickerUnion`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/sticker/StickerUnion.html), adding type casting Learn more about the changes to emojis and stickers in [Sticker and Emoji Rework](https://jda.wiki/introduction/migration-v4-v5/#sticker-and-emoji-rework). ### Installation All future JDA releases will be distributed through **maven central**. You no longer need to use `jcenter()` in your dependency manager. #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.0.0") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.0.0</version> </dependency> ``` ### Changelog (5.0.0-beta.24 -> 5.0.0) The changes since the latest beta release to this release. - Allow UserSnowflake subtypes in bulk ban methods by [@&#8203;freya022](https://github.com/freya022) ([#&#8203;2689](https://github.com/discord-jda/JDA/issues/2689)) - Update MessageType enum by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) ([#&#8203;2691](https://github.com/discord-jda/JDA/issues/2691)) - Improve Unknown Interaction error responses by [@&#8203;freya022](https://github.com/freya022) ([#&#8203;2687](https://github.com/discord-jda/JDA/issues/2687)) - Update ErrorResponse enum by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) ([#&#8203;2693](https://github.com/discord-jda/JDA/issues/2693)) - Add missing permissions by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) ([#&#8203;2690](https://github.com/discord-jda/JDA/issues/2690)) - Update and remove deprecated symbols by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) ([#&#8203;2686](https://github.com/discord-jda/JDA/issues/2686)) ### Changelog (4.4.0 -> 5.0.0) Note that this changelog is a linear history of changes. This means some earlier changes have already been superseded or refined in more recent changes. This changelog is slightly compressed to remove unimportant changes, you can see the full list of commits [here](https://github.com/discord-jda/JDA/compare/v4.4.0...v5.0.0). Thank you all for contributing! #### New Features <details> <summary>New feature additions since <b>4.4.0</b></summary> - Add GenericMessageEvent#getThreadChannel() by [@&#8203;rtm516](https://github.com/rtm516) in https://github.com/discord-jda/JDA/pull/1924 - Add Message.Attachment#getDescription by [@&#8203;sebm253](https://github.com/sebm253) in https://github.com/discord-jda/JDA/pull/1930 - Add Guild#isBoostProgressBarEnabled by [@&#8203;sebm253](https://github.com/sebm253) in https://github.com/discord-jda/JDA/pull/1891 - Add support for member timeouts by [@&#8203;sebm253](https://github.com/sebm253) in https://github.com/discord-jda/JDA/pull/1902 - Add support for attachment options by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2001 - Add CommandInteractionPayload#getOption fallback overloads by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2018 - Add Booster to memberCachePolicy by [@&#8203;sofiadparamo](https://github.com/sofiadparamo) in https://github.com/discord-jda/JDA/pull/2022 - Add PaginationAction#order by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/1945 - Add Tags, Default Install Url, Scopes and Permissions to ApplicationInfo by [@&#8203;Xirado](https://github.com/Xirado) in https://github.com/discord-jda/JDA/pull/1936 - Add CommandInteractionPayload#isGuildCommand by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2091 - Add UserSnowflake and improve User#fromId by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2065 - Add support for modals by [@&#8203;Xirado](https://github.com/Xirado) in https://github.com/discord-jda/JDA/pull/2024 - Add ImageProxy & FileProxy by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/1955 - Add Message#getStartedThread and ThreadChannel#retrieveParentMessage by [@&#8203;Almighty-Satan](https://github.com/Almighty-Satan) in https://github.com/discord-jda/JDA/pull/2099 - Add FileUpload class by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2120 - Add Support for Application-Command Permissions V2 by [@&#8203;Xirado](https://github.com/Xirado) in https://github.com/discord-jda/JDA/pull/2113 - Application command localization by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2090 - Add EmojiUnion by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2167 - Add JDABuilder#setEventPassthrough by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2014 - Add ApplicationInfo#getFlags by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2202 - Add support for setting voice region on channel creation/copy by [@&#8203;CheesyGamer77](https://github.com/CheesyGamer77) in https://github.com/discord-jda/JDA/pull/2209 - add support for string option bounds by [@&#8203;sebm253](https://github.com/sebm253) in https://github.com/discord-jda/JDA/pull/2169 - Add DataPath util by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2212 - Add category feature to ChannelOrderAction by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2136 - Added RestAction#onSuccess by [@&#8203;Zabuzard](https://github.com/Zabuzard) in https://github.com/discord-jda/JDA/pull/2227 - Add support for forum channels by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2184 - Add GuildManager#setFeatures by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2222 - Add support for guild scheduled events v2 by [@&#8203;Mitmocc](https://github.com/Mitmocc) in https://github.com/discord-jda/JDA/pull/2047 - Implement new select menus by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2287 - Add slash command mentions by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2251 - Implement "ACTIVE_DEVELOPER" UserFlag by [@&#8203;jasonlessenich](https://github.com/jasonlessenich) in https://github.com/discord-jda/JDA/pull/2326 - Add support for age-restricted (nsfw) commands by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2325 - Add application_id support for received messages by [@&#8203;Almighty-Satan](https://github.com/Almighty-Satan) in https://github.com/discord-jda/JDA/pull/2335 - Implement thread member pagination by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2338 - Add guild welcome screens by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2264 - Add support for gif stickers by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2377 - Add support for reverse audit-log iteration by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2370 - Add GuildAuditLogEntryCreateEvent by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2380 - Add `SUPPRESS_NOTIFICATIONS` flag for message by [@&#8203;Mysterious-Dev](https://github.com/Mysterious-Dev) in https://github.com/discord-jda/JDA/pull/2393 - Add new message types by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2371 - Add rate-limiter customization by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2307 - Add support for member flags by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2417 - Support custom timeout on tasks by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2439 - Add EmbedBuilder#setUrl by [@&#8203;Xirado](https://github.com/Xirado) in https://github.com/discord-jda/JDA/pull/2449 - Add voice message read support by [@&#8203;RedDaedalus](https://github.com/RedDaedalus) in https://github.com/discord-jda/JDA/pull/2445 - Add automod support by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2429 - Add ThreadChannel#retrieveStartMessage by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2438 - Support embed deserialization from JSON data by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2471 - Add the message author id to message reaction events by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2499 - Add supplier based FileUpload by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2508 - Add custom status support for bots by [@&#8203;RedDaedalus](https://github.com/RedDaedalus) in https://github.com/discord-jda/JDA/pull/2521 - Allow slowmode & nsfw in Stage Channels by [@&#8203;kazuryyx](https://github.com/kazuryyx) in https://github.com/discord-jda/JDA/pull/2538 - Add LRUMemberCachePolicy by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2506 - Add initial support for media channels by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2516 - Add default_values support by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2542 - Implement super reaction handling by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2554 - Add voice status feature by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2532 - Add missing proxy url field to the MessageEmbed.VideoInfo class by [@&#8203;shaksternano](https://github.com/shaksternano) in https://github.com/discord-jda/JDA/pull/2618 - Add support for bulk banning users by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2630 - Add the ability to set the bot banner by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2629 - Add support for premium app subscriptions by [@&#8203;Giuliopime](https://github.com/Giuliopime) in https://github.com/discord-jda/JDA/pull/2583 - Poll support by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2649 - Add missing features relating to premium app subscriptions by [@&#8203;Tobias123567](https://github.com/Tobias123567) in https://github.com/discord-jda/JDA/pull/2667 - Update MessageType enum by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2691 - Update ErrorResponse enum by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2693 - Add missing permissions by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2690 </details> #### Breaking Changes <details> <summary>Breaking changes since <b>4.4.0</b></summary> - Update Activity(Type) by [@&#8203;DManstrator](https://github.com/DManstrator) in https://github.com/discord-jda/JDA/pull/1798 - Update Permissions for JDA5 by [@&#8203;DManstrator](https://github.com/DManstrator) in https://github.com/discord-jda/JDA/pull/1797 - Remove GuildManager#setVanityCode by [@&#8203;sebm253](https://github.com/sebm253) in https://github.com/discord-jda/JDA/pull/1933 - Interaction Rework by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/1971 - Make getDefaultChannel return BaseGuildMessageChannel by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2016 - Change PrivateChannel#getUser to handle API nullability by [@&#8203;oliver276](https://github.com/oliver276) in https://github.com/discord-jda/JDA/pull/2012 - Remove StoreChannel by [@&#8203;V-Play-Games](https://github.com/V-Play-Games) in https://github.com/discord-jda/JDA/pull/2011 - Change some voice Regions and remove VOICE_CHANNEL_REGIONS set by [@&#8203;sebm253](https://github.com/sebm253) in https://github.com/discord-jda/JDA/pull/1962 - Fix misspelled ErrorResponse enum value by [@&#8203;Xirado](https://github.com/Xirado) in https://github.com/discord-jda/JDA/pull/2031 - Implement pagination for the guild ban list by [@&#8203;RedDaedalus](https://github.com/RedDaedalus) in https://github.com/discord-jda/JDA/pull/2076 - Return MessageReaction for getReactionX methods by [@&#8203;duncte123](https://github.com/duncte123) in https://github.com/discord-jda/JDA/pull/2026 - Remove confusing permission override methods by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2067 - Remove manager instance cache by [@&#8203;duncte123](https://github.com/duncte123) in https://github.com/discord-jda/JDA/pull/2106 - Message interface declutter: Message#getMentions() by [@&#8203;DV8FromTheWorld](https://github.com/DV8FromTheWorld) in https://github.com/discord-jda/JDA/pull/2015 - Rework stickers by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2104 - Changed addField String name and String Value to Nonnull by [@&#8203;RealYusufIsmail](https://github.com/RealYusufIsmail) in https://github.com/discord-jda/JDA/pull/2133 - Uniform representation of emoji by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2117 - Introduce Channel Unions by [@&#8203;DV8FromTheWorld](https://github.com/DV8FromTheWorld) in https://github.com/discord-jda/JDA/pull/2138 - Replace occurrences of Locale with DiscordLocale by [@&#8203;MineKing9534](https://github.com/MineKing9534) in https://github.com/discord-jda/JDA/pull/2173 - Message Rework by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2187 - Remove ChannelAction#setType by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2218 - Invalid token exception by [@&#8203;java-coding-prodigy](https://github.com/java-coding-prodigy) in https://github.com/discord-jda/JDA/pull/2025 - Add support for ban deletion with seconds precision by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2229 - Update to gateway version 10 by [@&#8203;freyacodes](https://github.com/freyacodes) in https://github.com/discord-jda/JDA/pull/2228 - Move channels to separate package and cleanup code by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2180 - Update event hierarchy by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/1952 - Make Widget an interface and move it to it's own file by [@&#8203;Almighty-Satan](https://github.com/Almighty-Satan) in https://github.com/discord-jda/JDA/pull/2295 - Remove AccountType by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2420 - Deprecate and replace onUserSpeaking by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2496 </details> #### Other Changes <details> <summary>Other noteworthy changes since <b>4.4.0</b></summary> - Add Missing Varargs and Methods Accepting Collection Arguments by [@&#8203;aasmart](https://github.com/aasmart) in https://github.com/discord-jda/JDA/pull/1810 - Make OptionData#addChoice accept long instead of int by [@&#8203;Xirado](https://github.com/Xirado) in https://github.com/discord-jda/JDA/pull/1816 - Make SelectionMenu#getOptions return an unmodifiable list by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/1922 - Make Guild#moveVoiceMember support AudioChannel instead by [@&#8203;sebm253](https://github.com/sebm253) in https://github.com/discord-jda/JDA/pull/1928 - Add support for animated guild banners by [@&#8203;sebm253](https://github.com/sebm253) in https://github.com/discord-jda/JDA/pull/1897 - Hardcode gateway url by [@&#8203;Xirado](https://github.com/Xirado) in https://github.com/discord-jda/JDA/pull/1957 - Move requestToSpeak to StageChannel by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/1978 - Add IGuildChannelContainer and getChannelById(Class, id) by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/1949 - Don't override latest message id on deletion event by [@&#8203;ishwi](https://github.com/ishwi) in https://github.com/discord-jda/JDA/pull/2013 - Remove mentioning members with ! by [@&#8203;Tais993](https://github.com/Tais993) in https://github.com/discord-jda/JDA/pull/2081 - Add new message types for automod by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2116 - Do not ignore member cache policy when chunking is enabled by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2053 - Make more use of CacheRestAction by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2158 - Handle text in voice channels by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2072 - Update to API version 10 by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2165 - Implement gateway resume url handling by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2203 - Add support for component-only messages by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2241 - Use String#intern for guild features and atoms by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2235 - Improve `toString` methods by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2273 - Forward shutdown reason to awaitStatus exception by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2268 - Improve GuildChannel#getPosition and Guild#getChannels by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2320 - Replace lock code with atomic int by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2359 - Improve implementation of command data by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2258 - Necessary additions for role subscriptions by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2375 - Support messages in stage channels by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2399 - Start migration to new username API by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2462 - Improve handling of method discovery in AnnotatedEventManager by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2454 - Change thread model used for requests by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2463 - Add more logging to request handling by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2589 - Add missing message types by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2531 - Unified channel cache by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2528 - Add support for enforce_nonce by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2614 - Create an exception when receiving UNKNOWN_WEBHOOK in interaction hooks by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2621 - Add USER_MUST_BE_VERIFIED ErrorResponse by [@&#8203;GitMilchi](https://github.com/GitMilchi) in https://github.com/discord-jda/JDA/pull/2651 - Update permission enum by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2654 - Add more static analyzer annotations by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2675 - Improve Unknown Interaction error responses by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2687 </details> #### Bug Fixes <details> <summary>Bugs fixed since <b>4.4.0</b></summary> - Fix wrong check in GenericMessageEvent#getGuildChannel by [@&#8203;sebm253](https://github.com/sebm253) in https://github.com/discord-jda/JDA/pull/1927 - Fix rate limiter not shutting down if there is an empty bucket at shutdown by [@&#8203;Vankka](https://github.com/Vankka) in https://github.com/discord-jda/JDA/pull/2080 - Prevent creating OptionData with OptionType#UNKNOWN by [@&#8203;sebm253](https://github.com/sebm253) in https://github.com/discord-jda/JDA/pull/2101 - Handle emoji_id sometimes being 0 instead of null by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2279 - Use deep copy for layout components when applying message data by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2236 - Fix some lock issues by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2339 - Change handling of speaking updates in voice connections by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2240 - Improve conditional waiting and shutdown handling by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2269 - Fix slow shutdown during reconnects by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2464 - Update modulo for default avatars by id by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2475 - Fix handling of wrong length discriminators by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2478 - Handle clyde in DMs correctly by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2489 - Update User#formatTo by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2492 - Improve handling of query parameters in image proxy by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2551 - Fix orphaned rate-limit buckets by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2585 - Handle numeric keys for ETF maps by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2642 - Fix ClassCastException in EntityBuilder#updateMemberCache by [@&#8203;Xirado](https://github.com/Xirado) in https://github.com/discord-jda/JDA/pull/2660 </details> ### [`v5.0.0-beta.24`](https://github.com/discord-jda/JDA/releases/tag/v5.0.0-beta.24): | Bug fixes and entitlement types [Compare Source](https://github.com/discord-jda/JDA/compare/v5.0.0-beta.23...v5.0.0-beta.24) ### Overview This is a small bugfix release, including some missing features for **premium app entitlements**. ##### Additional Entitlement Features ([#&#8203;2667](https://github.com/discord-jda/JDA/issues/2667)) This release adds support for **test entitlements** and **consumed entitlements**. An entitlement can be *consumed*, marking it as already used. This can be useful for one-time entitlements, which are consumed on use. ```java public boolean hasEntitlement(long skuId, List<Entitlement> entitlements) { return entitlements.stream().anyMatch(e -> e.getSkuIdLong() == skuId && !e.isConsumed()); } ``` ```java public void consumeEntitlement(long skuId, List<Entitlement> entitlements) { entitlements.stream() .filter(e -> e.getSkuIdLong() == skuId && !e.isConsumed()) .findFirst() .ifPresent(entitlement -> entitlement.consume().queue()); } ``` #### New Features - Add `IPostContainerManager#setTopic` by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2666 - Add missing features relating to premium app subscriptions by [@&#8203;Tobias123567](https://github.com/Tobias123567) in https://github.com/discord-jda/JDA/pull/2667 #### Changes - Improve logging for gateway connection by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2665 - Add more static analyzer annotations by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2675 - Update SLF4J api and jackson by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2674 #### Bug Fixes - Fix ClassCastException in EntityBuilder#updateMemberCache by [@&#8203;Xirado](https://github.com/Xirado) in https://github.com/discord-jda/JDA/pull/2660 - Properly copy poll data in MessageCreateRequest#applyData by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2662 - Make channel access checks consistent by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2679 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.0.0-beta.23...v5.0.0-beta.24 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.0.0-beta.24") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.0.0-beta.24</version> </dependency> ``` ### [`v5.0.0-beta.23`](https://github.com/discord-jda/JDA/releases/tag/v5.0.0-beta.23): | Message Polls [Compare Source](https://github.com/discord-jda/JDA/compare/v5.0.0-beta.22...v5.0.0-beta.23) ### Overview This release includes an updated README, please let us know if you spot any issues with it! ##### Polls ([#&#8203;2649](https://github.com/discord-jda/JDA/issues/2649)) Discord has recently released a new feature on their platform to start and vote in polls. These polls can now be sent in messages: ```java channel.sendMessage("Hello guys! Check my poll:") .setPoll( MessagePollData.builder("Which programming language is better?") .addAnswer("Java", Emoji.fromFormatted("<:java:1006323566314274856>")) .addAnswer("Kotlin", Emoji.fromFormatted("<:kotlin:295940257797636096>")) .build()) .queue() ``` The poll automatically expires after a set duration, configurable in the `MessagePollBuilder` using [setDuration](https://docs.jda.wiki/net/dv8tion/jda/api/utils/messages/MessagePollBuilder.html#setDuration\(java.time.Duration\)). A poll can also be ended manually using [endPoll](https://docs.jda.wiki/net/dv8tion/jda/api/entities/Message.html#endPoll\(\)) or [endPollById](https://docs.jda.wiki/net/dv8tion/jda/api/entities/channel/middleman/MessageChannel.html#endPollById\(java.lang.String\)). You can check the poll votes on a message using the new `Message#getPoll`: ```java MessagePoll poll = message.getPoll(); for (MessagePoll.Answer answer : poll.getAnswers()) { System.out.printf("Poll Answer %s has %d votes\n", answer.getText(), answer.getVotes()); } ``` > \[!NOTE] > The votes for polls are eventually consistent and need to be recounted after the poll ends. You can check whether the votes are validated using [MessagePoll#isFinalizedVotes](https://docs.jda.wiki/net/dv8tion/jda/api/entities/messages/MessagePoll.html#isFinalizedVotes\(\)). #### New Features - Add USER_MUST_BE_VERIFIED ErrorResponse by [@&#8203;GitMilchi](https://github.com/GitMilchi) in https://github.com/discord-jda/JDA/pull/2651 - Update permission enum by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2654 - Poll support by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2649 #### Changes - Update dependencies and use version catalog by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2652 #### Bugs Fixes - Fix `CommandInteractionPayload#getCommandString` in autocomplete interactions by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2659 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.0.0-beta.22...v5.0.0-beta.23 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.0.0-beta.23") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.0.0-beta.23</version> </dependency> ``` ### [`v5.0.0-beta.22`](https://github.com/discord-jda/JDA/releases/tag/v5.0.0-beta.22): | Bulk ban, premium apps, bug fixes [Compare Source](https://github.com/discord-jda/JDA/compare/v5.0.0-beta.21...v5.0.0-beta.22) ### Overview This release adds some newer API features, like premium app subscriptions, bot banners, and bulk banning users. Besides new features, this release also includes improved errors and bug fixes. ##### Premium App Subscriptions ([#&#8203;2583](https://github.com/discord-jda/JDA/issues/2583)) If your bot is eligible for monetization, you can now use JDA to handle [**entitlements**](https://docs.jda.wiki/net/dv8tion/jda/api/interactions/Interaction.html#getEntitlements\(\)) in interactions to restrict features. With [`event.replyWithPremiumRequired()`](https://docs.jda.wiki/net/dv8tion/jda/api/interactions/callbacks/IPremiumRequiredReplyCallback.html#replyWithPremiumRequired\(\)), you can upsell a premium subscription to a user: ![b306d1ccc7205d2291f4535f912a790e](https://github.com/discord-jda/JDA/assets/18090140/61197d9f-b900-4259-9722-c4a357960482) Read more about entitlements and premium app subscriptions in the [Discord Developer Docs](https://discord.com/developers/docs/monetization/app-subscriptions). ##### Bulk Ban ([#&#8203;2630](https://github.com/discord-jda/JDA/issues/2630)) You can now ban up to 200 users in one request using [`guild.ban(users, messageDeleteTimeframe)`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/Guild.html#ban\(java.util.Collection,java.time.Duration\)). This endpoint has a few quirks to keep in mind: - The [BulkBanResponse](https://docs.jda.wiki/net/dv8tion/jda/api/entities/BulkBanResponse.html) includes **failed users** and **banned users** - If a user was already banned, they are in the **failed users** - If you don't have permissions to ban a user (higher role / owner), they also appear in **failed users** - The self user also appears in **failed users** - If all users "failed" you get an error response instead #### New Features - Add support for bulk banning users by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2630 - Add the ability to set the bot banner by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2629 - Add support for premium app subscriptions by [@&#8203;Giuliopime](https://github.com/Giuliopime) in https://github.com/discord-jda/JDA/pull/2583 #### Changes - Create an exception when receiving UNKNOWN_WEBHOOK in interaction hooks by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2621 #### Bug Fixes - Fix format specifiers when adding invalid choices by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2628 - Fix FlatMapRestAction predicate with complete or submit by [@&#8203;Whizyyy](https://github.com/Whizyyy) in https://github.com/discord-jda/JDA/pull/2636 - Handle numeric keys for ETF maps by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2642 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.0.0-beta.21...v5.0.0-beta.22 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.0.0-beta.22") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.0.0-beta.22</version> </dependency> ``` ### [`v5.0.0-beta.21`](https://github.com/discord-jda/JDA/releases/tag/v5.0.0-beta.21): | Bug fixes and enforced nonce on messages [Compare Source](https://github.com/discord-jda/JDA/compare/v5.0.0-beta.20...v5.0.0-beta.21) ### Overview This release fixes a few bugs but also implements a new behavior on message sending. With the new [enforce nonce](https://discord.com/developers/docs/change-log#enforced-nonces-on-create-message-endpoint) behavior, messages will no longer be duplicated due to timeouts or discord outages. This means, any message request will now send an automatically generated [nonce](https://en.wikipedia.org/wiki/Cryptographic_nonce). You can still set a custom nonce using [setNonce](https://docs.jda.wiki/net/dv8tion/jda/api/requests/restaction/MessageCreateAction.html#setNonce\(java.lang.String\)), but you should make sure that this nonce is **unique**. If you previously relied on this setter, ensure that you are not sending duplicated nonce values. #### New Features - Add DiscordLocale values for these locales: Indonesian and Latin America (Spanish LATAM) by [@&#8203;stackpan](https://github.com/stackpan) in https://github.com/discord-jda/JDA/pull/2627 #### Changes - Add support for enforce_nonce by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2614 #### Bug Fixes - Add missing generic type to shardmanager by [@&#8203;duncte123](https://github.com/duncte123) in https://github.com/discord-jda/JDA/pull/2612 - Add missing proxy url field to the MessageEmbed.VideoInfo class by [@&#8203;shaksternano](https://github.com/shaksternano) in https://github.com/discord-jda/JDA/pull/2618 - Fix suppressing embeds on messages with webhooks by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2620 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.0.0-beta.20...v5.0.0-beta.21 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.0.0-beta.21") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.0.0-beta.21</version> </dependency> ``` ### [`v5.0.0-beta.20`](https://github.com/discord-jda/JDA/releases/tag/v5.0.0-beta.20): | Bug fixes and internal refactoring [Compare Source](https://github.com/discord-jda/JDA/compare/v5.0.0-beta.19...v5.0.0-beta.20) ### Overview With this release, we reworked a lot of internals related to how we cache channels. Ideally, you should not notice any difference. #### New Features - Added missing properties to ApplicationInfo by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2605 #### Changes - Unified channel cache by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2528 - Return immutable lists when documented by [@&#8203;freya022](https://github.com/freya022) in https://github.com/discord-jda/JDA/pull/2607 #### Bug Fixes - Fix clearing of voice status by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2601 - Handle canTalk for private threads in interactions by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2603 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.0.0-beta.19...v5.0.0-beta.20 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.0.0-beta.20") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.0.0-beta.20</version> </dependency> ``` ### [`v5.0.0-beta.19`](https://github.com/discord-jda/JDA/releases/tag/v5.0.0-beta.19): | Bug fixes and voice channel status [Compare Source](https://github.com/discord-jda/JDA/compare/v5.0.0-beta.18...v5.0.0-beta.19) ### Overview Smaller release with some bug fixes and added support for [voice channel status](https://github.com/discord-jda/JDA/pull/2532) feature. ##### Voice Channel Status ([#&#8203;2532](https://github.com/discord-jda/JDA/issues/2532)) Bots can now configure the voice channel status, shown when opening a voice channel in full screen mode. This works similarly to a channel topic, but can be configured by everyone who is currently connected to the channel. The new `VOICE_SET_STATUS` permission indicates whether a user can change the channel status while they are connected. When a user is not connected to the channel, the `MANAGE_CHANNEL` permission is required instead (similar to topics). Note that this feature might be replaced by a new "hang status" in the future, which would instead show on the user rather than the channel. #### New Features - Add voice status feature by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2532 #### Changes - Add more logging to request handling by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2589 - Add missing message types by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2531 - Updating Dependencies by [@&#8203;Lewox](https://github.com/Lewox) in https://github.com/discord-jda/JDA/pull/2591 - Add check for max number of fields in EmbedBuilder by [@&#8203;Andre601](https://github.com/Andre601) in https://github.com/discord-jda/JDA/pull/2592 #### Bug Fixes - Fix incorrect hook injection for message context commands by [@&#8203;MinnDevelopment](https://github.com/MinnDevelopment) in https://github.com/discord-jda/JDA/pull/2593 **Full Changelog**: https://github.com/discord-jda/JDA/compare/v5.0.0-beta.18...v5.0.0-beta.19 ### Installation #### Gradle ```gradle repositories { mavenCentral() } dependencies { implementation("net.dv8tion:JDA:5.0.0-beta.19") } ``` #### Maven ```xml <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>5.0.0-beta.19</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzcuMiIsInVwZGF0ZWRJblZlciI6IjM4LjkzLjAiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIifQ==-->
Rainnny added 1 commit 2024-03-17 20:01:23 -07:00
Rainnny changed title from fix(deps): update dependency net.dv8tion:jda to v5.0.0-beta.21 to fix(deps): update dependency net.dv8tion:jda to v5.0.0-beta.22 2024-04-06 15:02:56 -07:00
Rainnny force-pushed renovate/net.dv8tion-jda-5.x from ab35771d23 to 29ac049279 2024-04-06 15:03:04 -07:00 Compare
Rainnny changed title from fix(deps): update dependency net.dv8tion:jda to v5.0.0-beta.22 to fix(deps): update dependency net.dv8tion:jda to v5.0.0-beta.23 2024-04-21 03:02:14 -07:00
Rainnny force-pushed renovate/net.dv8tion-jda-5.x from 29ac049279 to 3d3865b066 2024-04-21 03:02:30 -07:00 Compare
Rainnny force-pushed renovate/net.dv8tion-jda-5.x from 3d3865b066 to f61e279cf5 2024-09-09 12:28:09 -07:00 Compare
Rainnny changed title from fix(deps): update dependency net.dv8tion:jda to v5.0.0-beta.23 to fix(deps): update dependency net.dv8tion:jda to v5.1.0 2024-09-09 12:28:10 -07:00
Rainnny changed title from fix(deps): update dependency net.dv8tion:jda to v5.1.0 to fix(deps): update dependency net.dv8tion:jda to v5.1.1 2024-09-21 05:02:38 -07:00
Rainnny force-pushed renovate/net.dv8tion-jda-5.x from f61e279cf5 to 53f3df8567 2024-09-21 05:02:39 -07:00 Compare
Rainnny force-pushed renovate/net.dv8tion-jda-5.x from 53f3df8567 to 2bf94ffbb2 2024-10-05 03:01:55 -07:00 Compare
Rainnny changed title from fix(deps): update dependency net.dv8tion:jda to v5.1.1 to fix(deps): update dependency net.dv8tion:jda to v5.1.2 2024-10-05 03:01:56 -07:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/net.dv8tion-jda-5.x:renovate/net.dv8tion-jda-5.x
git checkout renovate/net.dv8tion-jda-5.x
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Rainnny/LicenseServer#2
No description provided.