Skip to content
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

Update dependency net.dv8tion:JDA to v5.2.1 #199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 23, 2022

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
net.dv8tion:JDA 5.0.0-alpha.17 -> 5.2.1 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

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

v5.2.1

Compare Source

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

Compare Source

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

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.

@&#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

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: 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>

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: discord-jda/JDA@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: discord-jda/JDA@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: discord-jda/JDA@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

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

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 force-pushed the renovate/net.dv8tion-jda-5.x branch from c1ed193 to 6b91e6a Compare November 27, 2022 21:08
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-alpha.22 Update dependency net.dv8tion:JDA to v5.0.0-beta.1 Nov 27, 2022
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 6b91e6a to 58d3262 Compare December 8, 2022 16:57
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.1 Update dependency net.dv8tion:JDA to v5.0.0-beta.2 Dec 8, 2022
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 58d3262 to 8d34691 Compare March 16, 2023 21:58
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.2 Update dependency net.dv8tion:JDA to v5.0.0-beta.5 Mar 16, 2023
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.5 Update dependency net.dv8tion:JDA to v5.0.0-beta.6 Mar 22, 2023
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 8d34691 to 094a221 Compare March 22, 2023 23:29
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.6 Update dependency net.dv8tion:JDA to v5.0.0-beta.8 Apr 17, 2023
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 094a221 to 4f111ac Compare April 17, 2023 12:10
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 4f111ac to 4c8e0a9 Compare May 28, 2023 11:44
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.8 Update dependency net.dv8tion:JDA to v5.0.0-beta.9 May 28, 2023
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.9 Update dependency net.dv8tion:JDA to v5.0.0-beta.10 Jun 4, 2023
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 4c8e0a9 to b1d60b1 Compare June 4, 2023 16:33
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from b1d60b1 to 49cb23d Compare June 19, 2023 19:51
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.10 Update dependency net.dv8tion:JDA to v5.0.0-beta.11 Jun 19, 2023
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.11 Update dependency net.dv8tion:JDA to v5.0.0-beta.12 Jul 1, 2023
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 49cb23d to fbafb0a Compare July 1, 2023 18:47
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from fbafb0a to 89541c7 Compare August 6, 2023 16:07
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.12 Update dependency net.dv8tion:JDA to v5.0.0-beta.13 Aug 6, 2023
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 89541c7 to cab06b0 Compare September 29, 2023 16:52
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.13 Update dependency net.dv8tion:JDA to v5.0.0-beta.14 Sep 29, 2023
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.14 Update dependency net.dv8tion:JDA to v5.0.0-beta.15 Sep 30, 2023
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from cab06b0 to 318533d Compare September 30, 2023 18:31
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 318533d to d952341 Compare October 22, 2023 18:45
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.15 Update dependency net.dv8tion:JDA to v5.0.0-beta.16 Oct 22, 2023
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.16 Update dependency net.dv8tion:JDA to v5.0.0-beta.17 Oct 29, 2023
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from d952341 to 5031563 Compare October 29, 2023 16:03
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.17 Update dependency net.dv8tion:JDA to v5.0.0-beta.18 Nov 19, 2023
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 5031563 to 7d7f87f Compare November 19, 2023 12:59
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 7d7f87f to 7a275b3 Compare January 1, 2024 15:35
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.18 Update dependency net.dv8tion:JDA to v5.0.0-beta.19 Jan 1, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 7a275b3 to bec5d72 Compare January 21, 2024 13:21
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.19 Update dependency net.dv8tion:JDA to v5.0.0-beta.20 Jan 21, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from bec5d72 to 15ebee2 Compare March 10, 2024 19:49
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.20 Update dependency net.dv8tion:JDA to v5.0.0-beta.21 Mar 10, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 15ebee2 to 59b74b6 Compare April 6, 2024 23:03
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.21 Update dependency net.dv8tion:JDA to v5.0.0-beta.22 Apr 6, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 59b74b6 to b111841 Compare April 21, 2024 10:49
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.22 Update dependency net.dv8tion:JDA to v5.0.0-beta.23 Apr 21, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from b111841 to 3d6dfa2 Compare May 12, 2024 21:41
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.23 Update dependency net.dv8tion:JDA to v5.0.0-beta.24 May 12, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 3d6dfa2 to 9f3688f Compare July 7, 2024 21:29
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0-beta.24 Update dependency net.dv8tion:JDA to v5.0.0 Jul 7, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 9f3688f to 59c7b54 Compare July 15, 2024 18:21
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.0 Update dependency net.dv8tion:JDA to v5.0.1 Jul 15, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 59c7b54 to 79ab107 Compare August 4, 2024 17:25
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.1 Update dependency net.dv8tion:JDA to v5.0.2 Aug 4, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 79ab107 to f6920e0 Compare August 21, 2024 15:09
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.0.2 Update dependency net.dv8tion:JDA to v5.1.0 Aug 21, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from f6920e0 to 42c4afd Compare September 21, 2024 12:21
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.1.0 Update dependency net.dv8tion:JDA to v5.1.1 Sep 21, 2024
@renovate renovate bot force-pushed the renovate/net.dv8tion-jda-5.x branch from 42c4afd to 4b100a2 Compare October 5, 2024 13:21
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.1.1 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 4b100a2 to ba745f9 Compare November 3, 2024 18:10
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.1.2 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 ba745f9 to fc813f4 Compare November 10, 2024 19:19
@renovate renovate bot changed the title Update dependency net.dv8tion:JDA to v5.2.0 Update dependency net.dv8tion:JDA to v5.2.1 Nov 10, 2024
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.

0 participants