v5.0.0-alpha.21 | Small Event Changes
Overview
Almost ready for beta. This release changes a few event names and introduces a new interface GenericSessionEvent
. With this, almost every breaking change that we had planned is completed. There will likely only be one more alpha release before bumping to beta.
Event Changes (#1952)
Events related to the active gateway session / main socket now have a common abstraction called GenericSessionEvent
. We also changed a few event names for better clarity:
Old | New |
---|---|
DisconnectEvent | SessionDisconnectEvent |
ReconnectedEvent | SessionRecreateEvent |
ResumedEvent | SessionResumeEvent |
All the session related events are now in a common package at net.dv8tion.jda.api.events.session
, this also includes some breaking package changes for a few commonly used events like ReadyEvent
.
Additionally, events for voice channels of guild members have been changed slightly. Previously, we provided 3 separate voice channel update events:
- GuildVoiceJoinEvent
- GuildVoiceLeaveEvent
- GuildVoiceMoveEvent
Due to the confusing nature of these events, we have decided to instead only provide a single GuildVoiceUpdateEvent. This new event provides the old and new channel, which can each be null to indicate either a leave (null new channel) or join (null old channel).
Changes
- Update event hierarchy by @MinnDevelopment in #1952
- Make annotation dependencies compileOnly by @MinnDevelopment in #2249
Bug Fixes
- Fix check for ChannelAction#setCategory by @MinnDevelopment in #2259
- Fix some checks not throwing the intended exception by @MinnDevelopment in #2260
- fix: Use correct "flags" field for message create action by @RedDaedalus in #2272
- Handle newly_created gracefully by @MinnDevelopment in #2254
- Fix manager docs by @freya022 in #2271
- Add missing annotations on ThreadChannel by @MinnDevelopment in #2274
Full Changelog: v5.0.0-alpha.20...v5.0.0-alpha.21
Installation
Gradle
repositories {
mavenCentral()
}
dependencies {
implementation("net.dv8tion:JDA:5.0.0-alpha.21")
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>5.0.0-alpha.21</version>
</dependency>