Incendo / cloud-discord

Discord integrations for Cloud v2.
https://cloud.incendo.org/discord/
MIT License
5 stars 1 forks source link

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

Closed renovate[bot] closed 3 months ago

renovate[bot] commented 5 months ago

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`](https://togithub.com/discord-jda/JDA/releases/tag/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](https://togithub.com/DV8FromTheWorld/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 entitlements) { return entitlements.stream().anyMatch(e -> e.getSkuIdLong() == skuId && !e.isConsumed()); } ``` ```java public void consumeEntitlement(long skuId, List entitlements) { entitlements.stream() .filter(e -> e.getSkuIdLong() == skuId && !e.isConsumed()) .findFirst() .ifPresent(entitlement -> entitlement.consume().queue()); } ``` #### New Features - Add `IPostContainerManager#setTopic` by [@​freya022](https://togithub.com/freya022) in [https://github.com/discord-jda/JDA/pull/2666](https://togithub.com/discord-jda/JDA/pull/2666) - Add missing features relating to premium app subscriptions by [@​Tobias123567](https://togithub.com/Tobias123567) in [https://github.com/discord-jda/JDA/pull/2667](https://togithub.com/discord-jda/JDA/pull/2667) #### Changes - Improve logging for gateway connection by [@​MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2665](https://togithub.com/discord-jda/JDA/pull/2665) - Add more static analyzer annotations by [@​MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2675](https://togithub.com/discord-jda/JDA/pull/2675) - Update SLF4J api and jackson by [@​MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2674](https://togithub.com/discord-jda/JDA/pull/2674) #### Bug Fixes - Fix ClassCastException in EntityBuilder#updateMemberCache by [@​Xirado](https://togithub.com/Xirado) in [https://github.com/discord-jda/JDA/pull/2660](https://togithub.com/discord-jda/JDA/pull/2660) - Properly copy poll data in MessageCreateRequest#applyData by [@​MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2662](https://togithub.com/discord-jda/JDA/pull/2662) - Make channel access checks consistent by [@​MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2679](https://togithub.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 net.dv8tion JDA 5.0.0-beta.24 ``` ### [`v5.0.0-beta.23`](https://togithub.com/discord-jda/JDA/releases/tag/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](https://togithub.com/DV8FromTheWorld/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 [@​GitMilchi](https://togithub.com/GitMilchi) in [https://github.com/discord-jda/JDA/pull/2651](https://togithub.com/discord-jda/JDA/pull/2651) - Update permission enum by [@​MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2654](https://togithub.com/discord-jda/JDA/pull/2654) - Poll support by [@​MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2649](https://togithub.com/discord-jda/JDA/pull/2649) #### Changes - Update dependencies and use version catalog by [@​MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2652](https://togithub.com/discord-jda/JDA/pull/2652) #### Bugs Fixes - Fix `CommandInteractionPayload#getCommandString` in autocomplete interactions by [@​freya022](https://togithub.com/freya022) in [https://github.com/discord-jda/JDA/pull/2659](https://togithub.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 net.dv8tion JDA 5.0.0-beta.23 ``` ### [`v5.0.0-beta.22`](https://togithub.com/discord-jda/JDA/releases/tag/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](https://togithub.com/DV8FromTheWorld/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://togithub.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 ([#​2630](https://togithub.com/DV8FromTheWorld/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 [@​MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2630](https://togithub.com/discord-jda/JDA/pull/2630) - Add the ability to set the bot banner by [@​freya022](https://togithub.com/freya022) in [https://github.com/discord-jda/JDA/pull/2629](https://togithub.com/discord-jda/JDA/pull/2629) - Add support for premium app subscriptions by [@​Giuliopime](https://togithub.com/Giuliopime) in [https://github.com/discord-jda/JDA/pull/2583](https://togithub.com/discord-jda/JDA/pull/2583) #### Changes - Create an exception when receiving UNKNOWN_WEBHOOK in interaction hooks by [@​freya022](https://togithub.com/freya022) in [https://github.com/discord-jda/JDA/pull/2621](https://togithub.com/discord-jda/JDA/pull/2621) #### Bug Fixes - Fix format specifiers when adding invalid choices by [@​freya022](https://togithub.com/freya022) in [https://github.com/discord-jda/JDA/pull/2628](https://togithub.com/discord-jda/JDA/pull/2628) - Fix FlatMapRestAction predicate with complete or submit by [@​Whizyyy](https://togithub.com/Whizyyy) in [https://github.com/discord-jda/JDA/pull/2636](https://togithub.com/discord-jda/JDA/pull/2636) - Handle numeric keys for ETF maps by [@​MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2642](https://togithub.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 net.dv8tion JDA 5.0.0-beta.22 ``` ### [`v5.0.0-beta.21`](https://togithub.com/discord-jda/JDA/releases/tag/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](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 [@​stackpan](https://togithub.com/stackpan) in [https://github.com/discord-jda/JDA/pull/2627](https://togithub.com/discord-jda/JDA/pull/2627) #### Changes - Add support for enforce_nonce by [@​MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2614](https://togithub.com/discord-jda/JDA/pull/2614) #### Bug Fixes - Add missing generic type to shardmanager by [@​duncte123](https://togithub.com/duncte123) in [https://github.com/discord-jda/JDA/pull/2612](https://togithub.com/discord-jda/JDA/pull/2612) - Add missing proxy url field to the MessageEmbed.VideoInfo class by [@​shaksternano](https://togithub.com/shaksternano) in [https://github.com/discord-jda/JDA/pull/2618](https://togithub.com/discord-jda/JDA/pull/2618) - Fix suppressing embeds on messages with webhooks by [@​freya022](https://togithub.com/freya022) in [https://github.com/discord-jda/JDA/pull/2620](https://togithub.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 net.dv8tion JDA 5.0.0-beta.21 ```

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.



This PR has been generated by Mend Renovate. View repository job log here.

github-actions[bot] commented 5 months ago

Test Results

9 tests  ±0   9 :white_check_mark: ±0   0s :stopwatch: ±0s 3 suites ±0   0 :zzz: ±0  3 files   ±0   0 :x: ±0 

Results for commit 58f427db. ± Comparison against base commit 11aa20e5.

:recycle: This comment has been updated with latest results.