Releases: discord-jda/JDA
v3.6.0 | Manager Rewrite, Improved Documentation
In this release we are replacing the old and clunky updatable manager pattern with a new and flashy rest action extension pattern.
Legacy
channel.getManagerUpdatable()
.getNameField().setValue("testing")
.getTopicField().setValue("testing channel")
.update().queue();
New
channel.getManager()
.setName("testing") // returns ChannelManager
.setTopic("testing channel") // returns ChannelManager
.queue();
Documentation
The event documentation got a complete rewrite and should now be a lot cleaner and (hopefully) more understandable than before.
See: javadoc
Pull Requests
PR | Description |
---|---|
#595 | Add sharded listener provider |
#608 | Manager rewrite |
#611 | Store color with raw RGB value |
#613 | Support for parsing more presences |
#627 | Fallback body parsing for http response |
#628 | Add Japan region |
#630 | Added Guild#retrieveRegions |
#633 | Enhancement for Permissions/CacheView/ErrorResponseException |
#634 | Make mentions distinct |
#636 | First pass on new event docs |
#644 | Return RequestFuture for PaginationAction async iterations |
#645 | WebSocketClient optimization/enhancement |
#646 | Added support for bulk updating permission overrides |
Thank you all for your contributions!
Versions
The latest release build: 3.6.0_354
Changelog
Additions
+++ New managers++ UpdateEvent for generic update events
+ Support for bulk updating permission overrides in channels
+ ShardManager event listener provider
+ Guild#retrieveRegions
+ Japan voice region
+ Role#getColorRaw etc
Changes
- Mentions in Message#getMentionedUsers and getMentionedRoles are now distinct- Now returning RequestFuture in PaginationAction#forEachAsync and similar
- Color values are now stored as ints rather than java.awt.Color
- WebSocketClient now uses the same buffer for all received payloads
- Spotify presences are now parsed properly
- Renamed UserXUpdateEvent to UserUpdateXEvent for consistency
- UserUpdateNameEvent has been split into name and discriminator update events
Fixes
- ErrorResponseException now gives more details againDeprecation
+ Marked old updatable managers and associated classes/methods deprecated+ Marked several old methods in events as deprecated to be replaced by new consistent method names
Downloads for this version are available from the build server:
http://home.dv8tion.net:8080/job/JDA/ or below.
Gradle
repositories {
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.6.0_354'
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.6.0_354</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
RestAction Caller Context | Better RequestFuture Continuations
It really is difficult to debug when the stacktraces of RestAction failures don't point to your code...
We got the thing for you! In 3.5.1 we added ContextException
which can be used to track caller context for rest actions. What does this mean?
Simply add a failure consumer (see #queue(Consumer, Consumer)) to your restaction queue call and it will create a context exception right there. That exception is then added as a cause to the resulting failure.
RestAction<?> action = channel.sendMessage("Hello, World");
action.queue(null, ContextException.herePrintingTrace());
This will result in a proper exception with traces of the calling code.
If you need to do severe debugging you might want this on every rest action to test.
For this you can simply do the following:
RestAction.setPassContext(true); // enable context by default
RestAction.DEFAULT_FAILURE = Throwable::printStackTrace;
Doing this will result in major performance loss so it is recommended to only go to this extreme when you need to debug errors
Pull Requests
PR | Description |
---|---|
#550 | Added ContextException and checks for RestAction improvements |
#597 | Fix unban string |
#600 | Improved RequestFuture interface |
#604 | Removed caching of delete events |
#605 | "Fixed" permissions |
#606 | Replaces Semaphore with (superior) ReentrantLock |
#614 | Fixed Message#getMentionedX() methods returning non-mentioned entities |
#618 | Lazy evaluation of HTTP responses |
Thank you all for your contributions!
Versions
The latest release build: 3.5.1_339
Changelog
Downloads for this version are available from the build server:
http://home.dv8tion.net:8080/job/JDA/ or below.
Gradle
repositories {
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.5.1_339'
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.5.1_339</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
v3.5.0 | SessionController
In previous versions sharding seemed to have been a lot of work for new users. We decided to make a central elevated system that takes care of everything you need.
In addition to the ShardManager
(introduced in 3.4.0) we now added the SessionController
interface (and SessionControllerAdapter
implementation) for the convenience in sharding via the JDABuilder
approach.
You no longer have to handle the IDENTIFY
ratelimit (waiting 5 seconds between building) manually, it has been moved into the controller completely. This should resolve many issues that users had with the SessionReconnectQueue
approach of earlier versions (only handled reconnect, not building). We centered all of the sharding systems that were required previously into the new controller to have a single class responsible for cross-session behaviour and states such as:
- Global REST ratelimit
- Gateway retrieval
- Session start ratelimit
This system can easily be extended in later versions (through Java 1.8 default methods [c.t. jls]).
Pull Requests
PR | Description |
---|---|
#562 | Introducing SessionController System |
#578 | Added a CategoryOrderAction , documentation, and access points |
#581 | First pass on animated emote support |
#585 | Support for viewing ban reasons |
#586 | Update DefaultShardManagerBuilder.java |
#592 | Hotfix deadlock in audio connections |
Thank you all for your contributions!
Versions
The latest release build: 3.5.0_327
Changelog
Downloads for this version are available from the build server:
http://home.dv8tion.net:8080/job/JDA/ or below.
Gradle
repositories {
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.5.0_327'
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.5.0_327</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
v3.4.0 | Logger Rewrite - Part II, Message-Rewrite, ShardManager
We've rewritten major parts of our message handling and sending modules which should improve usability, maintainability, and readability.
The introduction of MessageAction
allows to send multiple files in one message and modify
the message before executing the send operation. Additionally it now allows to remove existing embeds using override(true)
event.getChannel().sendMessage("Hello ")
.append("World!")
.embed(new EmbedBuilder().setDescription("Test").build())
.queue( (message) -> message.editMessage("Removed Embed...").override(true).queue() )
With the addition of ShardManager
and DefaultShardManagerBuilder
you can now use a JDA sharding mechanism for your bot which should decrease the amount of time needed to setup sharding.
ShardManager manager = new DefaultShardManagerBuilder().setToken(MY_TOKEN).addEventListener(new BotListener()).build();
Pull Requests
PR | Description |
---|---|
#433 | Added PaginationAction#forEachAsync for async iterations |
#445 | Implemented phone verification (only get) and 50 MiB file limit for nitro accounts |
#453 | Message Rewrite |
#479 | Adding ShardedRateLimiter to keep track of global REST rate limit |
#480 | Adding ChannelManager#setPosition |
#490 | First pass on GuildAction |
#492 | SLF4J Logger rewrite part2 |
#494 | Added handling for relationship presence updates |
#523 | Hotfix zlib fragmentation |
#524 | role modification changes |
#533 | Made audio manager cache accessible from JDA instances |
#535 | Added methods to properly use message history endpoint |
#537 | Hacktoberfest Changes |
#542 | General cleanup of documentation and naming conventions |
#543 | Fixed issues with cache view iterators not being thread-safe |
#544 | Added new game types |
#547 | Added first support for viewing the RichPresences of other users |
#557 | Added MDC |
#558 | Added ability to get a Guild's features (vip voice, verified, ...) |
#559 | Added GuildVoiceUpdateEvent to combine leave and move |
#563 | Add missing null checks in HttpRequestEvent |
#567 | Updated README and templates |
#572 | Improve some logic in PermissionUtil |
#575 | Added some since tags, bumped version, removed old deprecated methods |
Thank you all for your contributions!
Versions
The latest release build: 3.4.0_317
Changelog
Downloads for this version are available from the build server:
http://home.dv8tion.net:8080/job/JDA/ or below.
Gradle
repositories {
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.4.0_317'
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.4.0_317</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
v3.3.1 | Logger Rewrite - Part I
This release contains the first of 2 parts for replacing the JDA SimpleLog implementation.
This breaks existing logging fundamentally as some features (including listeners, file loggers) were completely removed in favor of SLF4J.
Following up will be a complete replacement of SimpleLog with SLF4J support in release 3.4.0.
We made cache available through a new CacheView system which allows to check the size of the cache without first creating an immutable copy of the entire cache.
For instance to get the amount of members inside a Guild you can now do the following: guild.getMemberCache().size();
instead of guild.getMembers().size()
.
What's the difference? Guild.getMembers()
is implemented in a way that it copies all values from the internal map into a list and then decorates it to be immutable:
public List<Member> getMembers()
{
return Collections.unmodifiableList(new ArrayList<>(members.valueCollection()));
}
The new CacheView only returns an abstracted view on the map itself and allows to check the size without having to create a snapshot.
Categories
In this version we added first support for Category
inside of JDA which removes a lot of errors and warning from the console.
Additionally we provide the new structures and their managers. To get the category of a Channel
you can simply use the new getParent()
.
In order to move a Channel into a Category you don't add it to the Category but set the category on the Channel.
channel.getManager().setParent(category).queue();
Pull Requests
PR | Description |
---|---|
#440 | Improve access for copy methods & fix missing copy of isNSFW value |
#455 | Fixed handling of GuildMemberRemove and added cleanup to event cache |
#457 | Changed audio connection requests |
#458 | Do not retain the audio managers after shutdown |
#460 | Bootleg fix implementation for categories |
#465 | Introducing CacheView |
#469 | Switched to SLF4J for logging |
#473 | + TextChannelUpdateParentEvent to ListenerAdapter |
Thank you all for your contributions!
Versions
The latest release build: 3.3.1_276
Changelog
Downloads for this version are available from the build server:
http://home.dv8tion.net:8080/job/JDA/ or below.
Gradle
repositories {
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.3.1_276'
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.3.1_276</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
v3.3.0 | Improved Audio / Webhook Sending
In this version we looked into our voice handling again and made some adjustments that should fix long-term issues of past versions.
We now resume our voice sessions which allows to continue streaming without interruption unless resuming fails.
From this version forward you will be able to use JDA to send webhook messages.
Webhooks are able to change their username and avatar on every message they send, this can be achieved in JDA by building a
WebhookMessage
and sending it via a WebhookClient
.
More information in our wiki
Changelog
Downloads for this version are available from the build server:
http://home.dv8tion.net:8080/job/JDA/ or below.
Gradle
repositories {
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.3.0_260'
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.3.0_260</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
v3.2.0 | New HTTP Client and AuditLogs
With the release of version 3.2
JDA has fully replaced the mashape/Unirest-java dependency due to its problems concerning basic HTTP standards and unmaintained code (see the issue tracker for its repository)
This means that JDA will no longer provide transitive dependencies for Unirest and thus if you depended on it you will suffer with issues.
Instead of Unirest we are now using OkHTTP3 which should greatly improve performance and fix many major issues that came with Unirest due to it being static.
In the release of version 3.1.1
which had no release announcement we introduced support for AuditLogPaginationAction
through Guild.getAuditLogs()
and major support for adding reasons to auditable actions (such as those found in GuildController
).
For more information see these pages in our wiki: Paginating Entities, RestAction#auditlog-reasons
Changelog
Downloads for this version are available from the build server:
http://home.dv8tion.net:8080/job/JDA/ or below.
Gradle
repositories {
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.2.0_226'
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.2.0_226</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
v3.1.0
In this release we drastically changed the permission system and internal cache in order to save resources and achieve a better overall performance. This includes fixes for several memory leaks and threading issues like shard deaths and shutdown deadlocks.
Together with the change to unsigned long ids this added new overloads with long id parameters for getXById
methods and some other long related changes to allow switching to primitive longs entirely (recommended).
The JDA wiki has received some updates that are up-to-date with included changes.
https://github.com/DV8FromTheWorld/JDA/wiki
Changelog
Downloads for this version are available from the build server:
http://home.dv8tion.net:8080/job/JDA/ or below.
Gradle
repositories {
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.1.0_204'
}
Maven
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.1.0_204</version>
</dependency>
v3.0.0
This is the official release of the JDA 3.0 rewrite. Multiple parts of JDA have changed drastically since the legacy (2.x) builds were declared deprecated and it is recommended to pick JDA 3 up as a completely new library.
We have improved our wiki for JDA 3 and suggest taking a look.
Our release system changed to always have the latest version on the master branch, it is recommended to check which build number is currently available at the jenkins download server or on bintray.
Downloads for this version are available from the build server:
http://home.dv8tion.net:8080/job/JDA/
or below.
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.0.0_157</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
Gradle
dependencies {
compile 'net.dv8tion:JDA:3.0.0_157'
}
repositories {
jcenter()
}
Note: The mentioned build numbers might update and be outdated in this release draft
v3.0.BETA2
This is the second phase of the BETA builds of 3.x. With the release of this, 3.x is far beyond what 2.x provided and only misses a few things provided by 2.x (invites), but they will be added before release of 3.0.0.
Also, Audio!
Due to the nature of a Beta, it is recommended that you attempt to keep up with the latest version for fixes and changes. You can check the latest version by visiting the Jenkins build server.
Downloads for this version are available from the build server:
http://home.dv8tion.net:8080/job/JDA/108/
or below.
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.0.BETA2_108</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
Gradle
dependencies {
compile 'net.dv8tion:JDA:3.0.BETA2_108'
}
repositories {
jcenter()
}