v5.2.0 | Application emoji and premium buttons
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
- Added Safety Alerts Channel by @RealYusufIsmail in #2725
- Add
ScheduledEvent::getJumpUrl
by @raul1ro in #2736 - Add premium buttons by @freya022 in #2752
- Add support for Application Emoji by @yoyosource in #2726
Bug Fixes
- Fix handling of passing null to setMessageReference by @MinnDevelopment in #2749
Changes
- Deprecated
GatewayIntent#GUILD_EMOJIS_AND_STICKERS
in favor ofGUILD_EXPRESSIONS
by @freya022 in #2755 - Remove deprecated permission constants
- Remove deprecated and stage instance privacy level
Full Changelog: 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>