v5.0.0-beta.22 | Bulk ban, premium apps, bug fixes
MinnDevelopment
released this
06 Apr 21:31
·
65 commits
to master
since this release
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:
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
- Add support for bulk banning users by @MinnDevelopment in #2630
- Add the ability to set the bot banner by @freya022 in #2629
- Add support for premium app subscriptions by @Giuliopime in #2583
Changes
Bug Fixes
- Fix format specifiers when adding invalid choices by @freya022 in #2628
- Fix FlatMapRestAction predicate with complete or submit by @Whizyyy in #2636
- Handle numeric keys for ETF maps by @MinnDevelopment in #2642
Full Changelog: 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>