Skip to content

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

Compare
Choose a tag to compare
@MinnDevelopment MinnDevelopment released this 06 Apr 21:31
· 65 commits to master since this release
1bcfb73

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

  • Create an exception when receiving UNKNOWN_WEBHOOK in interaction hooks by @freya022 in #2621

Bug Fixes

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>