Overview
This is primarily a bug fix release, but also includes a minor breaking change for emojis.
Enable users to choose the requested format of assets (#3009)
Most methods, that previously returned ImageProxy or an image URL, now support passing ImageFormat to choose a different format. This enables users to easily switch from PNG to WEBP or other formats.
Additionally, most of the template strings used to create image URLs, such as User.AVATAR_URL, have been deprecated in favor of the new DiscordAssets utility class. You can use DiscordAssets.userAvatar(ImageFormat.PNG, userId, avatarId) to get an ImageProxy instance and use ImageProxy#getUrl to get the respective URL.
Warning
Breaking Changes
CustomEmoji#getImageandCustomEmoji#getImageUrlwill now usewebpformat by default. This is due to API changes which make thegifformat unreliable. See #2999 for details. You can useCustomEmoji#getImage(ImageFormat)to choose a different format, likeImageFormat.PNGorImageFormat.GIF.
New Features
- Adding s/S TimeFormat by @Sheldan in #3016
- Enable users to choose the requested format of assets by @freya022 in #3009
Bug Fixes
- Fix unique id not being copied in SelectMenus by @Kaktushose in #3013
- Use Locale.ROOT in AudioEncryption for consistent string handling by @arif-banai in #3024
Deprecations
- Template Strings for Image CDN URLs are replaced by DiscordAssets
- ScheduledEventUpdateImageEvent is replaced by ScheduledEventUpdateCoverImageEvent
Full Changelog: v6.3.0...v6.3.1
Installation
Gradle
repositories {
mavenCentral()
}
dependencies {
implementation("net.dv8tion:JDA:6.3.1")
}Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>6.3.1</version>
</dependency>