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

chore(deps): Update dependency net.dv8tion:JDA to v5.0.0-beta.24 #55

Merged
merged 1 commit into from
May 26, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 10, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
net.dv8tion:JDA 5.0.0-beta.20 -> 5.0.0-beta.24 age adoption passing confidence

Release Notes

DV8FromTheWorld/JDA (net.dv8tion:JDA)

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

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

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.

New Features

Changes

Bugs Fixes

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

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

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

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 Mend Renovate. View repository job log here.

Copy link

github-actions bot commented Mar 10, 2024

Test Results

9 tests  ±0   9 ✅ ±0   0s ⏱️ ±0s
3 suites ±0   0 💤 ±0 
3 files   ±0   0 ❌ ±0 

Results for commit 58f427d. ± Comparison against base commit 11aa20e.

♻️ This comment has been updated with latest results.

@renovate renovate bot changed the title chore(deps): Update dependency net.dv8tion:JDA to v5.0.0-beta.21 chore(deps): Update dependency net.dv8tion:JDA to v5.0.0-beta.22 Apr 6, 2024
@renovate renovate bot changed the title chore(deps): Update dependency net.dv8tion:JDA to v5.0.0-beta.22 chore(deps): Update dependency net.dv8tion:JDA to v5.0.0-beta.23 Apr 21, 2024
@renovate renovate bot changed the title chore(deps): Update dependency net.dv8tion:JDA to v5.0.0-beta.23 chore(deps): Update dependency net.dv8tion:JDA to v5.0.0-beta.24 May 12, 2024
@Citymonstret Citymonstret merged commit 190097a into master May 26, 2024
5 checks passed
@Citymonstret Citymonstret deleted the renovate/jda5 branch May 26, 2024 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant