Skip to content

v4.0.0 | Refactoring with Breaking Changes

Compare
Choose a tag to compare
@MinnDevelopment MinnDevelopment released this 11 Aug 15:17
· 990 commits to master since this release
19acdd5

This release bumps the major version because we have done a number of breaking changes. The most notable ones are:

  • Package rename core -> api
  • Removed GuildController
  • Renamed getX(): RestAction to retrieveX(): RestAction
  • Added @Nonnull and @Nullable annotations

More can be found in the migration guide.

The plan for version 3.X is to keep updating it with bug fixes until 01/01/2020. We recommend migrating your codebase before then.

New Features

  • MarkdownUtil A utility to easily apply markdown to text
  • MarkdownSanitizer A state-machine to sanitize discord markdown
  • GatewayPingEvent An event for updates to the gateway ping
  • ApplicationInfo#getTeam Team support in applications
  • Message#getMentionedXBag(): Bag<X> Bag accessors for mentions to check for duplicates
  • Guild#getVanityCode and Guild#getVanityUrl
  • Guild#getBoostTier, Guild#getBoostCount, and Guild#getBoosters
  • Guild#getBannerId and Guild#getBannerUrl
  • Guild#getMaxBitrate and Guild#getMaxEmotes
  • Guild#getMaxMembers and Guild#getMaxPresences
  • Guild#getDescription
  • Member#getTimeBoosted
  • AudioReceiveHandler#handleEncodedAudio and AudioReceiveHandler#canReceiveEncoded
  • AudioReceiveHandler#includeUserInCombinedAudio
  • Member#ban, Member#kick, Member#mute, Member#deafen, and Member#modifyNickname
  • Guild#getGuildChannelById and JDA#getGuildChannelById
  • Guild#kickVoiceMember
  • MessageChannel#getHistoryFromBeginning
  • Member#getOnlineStatus(ClientType)
  • ReactionEmote#isEmoji, ReactionEmote#getAsCodepoints, and ReactionEmote#getEmoji
  • AudioManager#setSpeakingDelay
  • JDA#getUserByTag, ShardManager#getUserByTag, and Guild#getMemberByTag
  • GuildChannel#upsertPermissionOverride
  • JDABuilder#setVoiceDispatchInterceptor and DefaultShardManagerBuilder#setVoiceDispatchInterceptor
  • CacheView#forEachUnordered, CacheView#applyStream, CacheView#acceptStream, and CacheView#lockedIterator
  • JDA#getRestPing
  • PaginationAction#skipTo
  • Support for StoreChannel
  • New message types
  • Lots of new events and setters on managers

Deprecation

  • Emote#hasRoles -> Emote#canProvideRoles
  • Guild#retrieveVanityUrl -> Guild#getVanityCode
  • Invite#getCreationTime -> Invite#getTimeCreated
  • JDA#getVoiceChannelByName -> JDA#getVoiceChannelsByName
  • DefaultShardManagerBuilder#setEventManager -> DefaultShardManagerBuilder#setEventManagerProvider
  • ShardManager#setGame -> ShardManager#setActivity
  • SessionController#getGatewayBot -> SessionController#getShardedGateway

Incubating

  • JDABuilder(AccountType)
  • Activity.watching
  • AudioManager#setSpeakingMode and AudioManager#getSpeakingMode

Installation

The release version is: 4.0.0_39

The latest version is: version

Gradle

repositories {
    jcenter()
}
dependencies {
    compile "net.dv8tion:JDA:4.0.0_39"
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>4.0.0_39</version>
</dependency>
<repository>
    <id>jcenter</id>
    <name>jcenter-bintray</name>
    <url>https://jcenter.bintray.com</url>
</repository>