v5.0.0-beta.24 | Bug fixes and entitlement types
MinnDevelopment
released this
12 May 15:01
·
63 commits
to master
since this release
Overview
This is a small bugfix release, including some missing features for premium app entitlements.
Additional Entitlement Features (#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.
public boolean hasEntitlement(long skuId, List<Entitlement> entitlements) {
return entitlements.stream().anyMatch(e -> e.getSkuIdLong() == skuId && !e.isConsumed());
}
public void consumeEntitlement(long skuId, List<Entitlement> entitlements) {
entitlements.stream()
.filter(e -> e.getSkuIdLong() == skuId && !e.isConsumed())
.findFirst()
.ifPresent(entitlement -> entitlement.consume().queue());
}
New Features
- Add
IPostContainerManager#setTopic
by @freya022 in #2666 - Add missing features relating to premium app subscriptions by @Tobias123567 in #2667
Changes
- Improve logging for gateway connection by @MinnDevelopment in #2665
- Add more static analyzer annotations by @MinnDevelopment in #2675
- Update SLF4J api and jackson by @MinnDevelopment in #2674
Bug Fixes
- Fix ClassCastException in EntityBuilder#updateMemberCache by @Xirado in #2660
- Properly copy poll data in MessageCreateRequest#applyData by @MinnDevelopment in #2662
- Make channel access checks consistent by @MinnDevelopment in #2679
Full Changelog: v5.0.0-beta.23...v5.0.0-beta.24
Installation
Gradle
repositories {
mavenCentral()
}
dependencies {
implementation("net.dv8tion:JDA:5.0.0-beta.24")
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>5.0.0-beta.24</version>
</dependency>