Skip to content

v4.2.0 | Gateway Intents

Compare
Choose a tag to compare
@MinnDevelopment MinnDevelopment released this 29 Jun 11:36
· 841 commits to master since this release
3a9fcd0

All support for AccountType.CLIENT has been removed. We can no longer support this API as it has diverged too much from the bot API.

In this release, we have to take a look at the new Discord API changes. As of late discord has been putting a lot of work into the privacy protection of their users. Unfortunately, that also includes limiting the data available to bots.
Bots are now required to explicitly state which features they intend to use by providing a set of GatewayIntents.

Additionally, bots should no longer directly depend on the cache of users/members with methods like getUserById() and getMembers(). You should now use lazy loading and load members through methods like retrieveMemberById or retrieveMembersByPrefix.

The old default behavior was to perform chunking on startup (explained in wiki article below). However, chunking is now a privileged feature which bots should not depend on. For this reason, we deprecated the old JDABuilder (and DefaultShardManagerBuilder) constructors in favor of new factory methods:

I've added a new wiki page that explains this in more detail: Gateway Intents and Member Cache Policy.

We have switched to the new domain discord.com. This will be required as of November 7, 2020.

New Features

  • GatewayIntents
  • MemberCachePolicy
  • Invite events
  • Mention Whitelist
  • RestAction timeout/deadline

You can check the full list of pull requests for more details:
4.2.0 Milestone

Thank you all for your contributions!

Deprecation

Detailed javadoc can be found in the deprecated tab of the docs

Installation

The release version is: 4.2.0_168

The latest version is: version

Gradle

repositories {
    jcenter()
}
dependencies {
    compile("net.dv8tion:JDA:4.2.0_168")
}

Maven

The jcenter repository now only works with https! Please change your URL from http to https

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