Releases: discord-jda/JDA
v4.0.0 | Refactoring with Breaking Changes
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
toretrieveX(): 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 textMarkdownSanitizer
A state-machine to sanitize discord markdownGatewayPingEvent
An event for updates to the gateway pingApplicationInfo#getTeam
Team support in applicationsMessage#getMentionedXBag(): Bag<X>
Bag accessors for mentions to check for duplicatesGuild#getVanityCode
andGuild#getVanityUrl
Guild#getBoostTier
,Guild#getBoostCount
, andGuild#getBoosters
Guild#getBannerId
andGuild#getBannerUrl
Guild#getMaxBitrate
andGuild#getMaxEmotes
Guild#getMaxMembers
andGuild#getMaxPresences
Guild#getDescription
Member#getTimeBoosted
AudioReceiveHandler#handleEncodedAudio
andAudioReceiveHandler#canReceiveEncoded
AudioReceiveHandler#includeUserInCombinedAudio
Member#ban
,Member#kick
,Member#mute
,Member#deafen
, andMember#modifyNickname
Guild#getGuildChannelById
andJDA#getGuildChannelById
Guild#kickVoiceMember
MessageChannel#getHistoryFromBeginning
Member#getOnlineStatus(ClientType)
ReactionEmote#isEmoji
,ReactionEmote#getAsCodepoints
, andReactionEmote#getEmoji
AudioManager#setSpeakingDelay
JDA#getUserByTag
,ShardManager#getUserByTag
, andGuild#getMemberByTag
GuildChannel#upsertPermissionOverride
JDABuilder#setVoiceDispatchInterceptor
andDefaultShardManagerBuilder#setVoiceDispatchInterceptor
CacheView#forEachUnordered
,CacheView#applyStream
,CacheView#acceptStream
, andCacheView#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
andAudioManager#getSpeakingMode
Installation
The release version is: 4.0.0_39
The latest version is:
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>
v4.BETA.0 | Breaking Changes - Pre-Release
This is the first pre-release of the version 4 changes. I've written a migration guide which should help updating an existing v3 codebase to v4.
We will continue pushing critical bug fixes for v3 for a few months after the final release of v4 but we recommend updating to v4.
Versions
The latest release build: 4.BETA.0_1
Gradle
repositories {
jcenter()
}
dependencies {
implementation("net.dv8tion:JDA:4.BETA.0_1")
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>4.BETA.0_1</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>https://jcenter.bintray.com</url>
</repository>
v3.8.3 | Version 3 Stable Release
In this version we only updated the OkHTTP dependency to the stable 3.13.0 release.
Gradle
repositories {
jcenter()
}
dependencies {
implementation("net.dv8tion:JDA:3.8.3_464")
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.8.3_464</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
v3.8.2 | JDA LTS Release
Important Notice
Recently we have started work on the new major version of JDA
This release signals the end of JDA v3's lifecycle in which we will only be fixing critical issues for the supported timeframe. Once v4 becomes the new stable release we will continue fixing issues with v3 for 6 months to give people with a huge codebase enough time for the conversion. The current expected time for the JDA version 4 release is mid May.
Currently JDA version 4 is in its alpha stadium. This means it receives breaking changes which are not yet supported by 3rd party extensions like lavalink. Once version 4 reaches its beta stadium we will make efforts to help extension developers to adapt to the new ABI provided as soon as possible. We attempt to make a clear separation between what we consider API and internal. We expect extensions to only target the API side of JDA in the future to reduce the possibility of causing incompatibilities.
New features and enhancements will only be coming to JDA 4. This includes new features of Discord as well as overhead reduction such as the changes done to CacheView. One of the major changes coming here is the removal of client-only features such as group channels/messages. We will however continue to support using JDA with AccountType.CLIENT
but it will be reduced to features available to bot accounts.
To track what is happening with JDA 4 you can take a look at the milestone: v4
Pull Requests
PR | Description |
---|---|
#793 | Read-only MessageActivity support |
#795 | Add Guild#getChannels for convenience |
#811 | Added setPresence to ShardManager and improved documentation consistency |
#814 | Added appendCodeLine(CharSequence text) |
#819 | Add ChannelAction#setPosition(Integer) |
#820 | Close socket on malformed zip data |
#825 | Added copying of the slowmode when cloning a channel |
#826 | Hacktoberfest Changes |
#827 | Don't check admin on permission overrides |
#843 | Update OkHTTP to 3.12.0 |
#849 | Create User#getAsTag |
#887 | Add MESSAGE_ADD_REACTION to text only permissions |
#896 | Ignore alpha when comparing colors in MessageEmbed |
Thank you all for your contributions!
Versions
The latest release build: 3.8.2_459
Changelog
Additions
- Guild#getChannels to get the display order of the channels in a guild
- MessageBuilder#appendCodeLine for more intuitive monospace usage
- ShardManager#setPresence to update both game an online-status in one request
- ChannelAction#setPosition for applying a channel position before its creation
- User#getAsTag for easy retrieval of
Minn#6688
format - MessageActivity support for spotify and game invites
Changes
- The WebSocket will now reconnect when malformed data is received for better recovering
- MessageEmbed#equals now only checks RGB value of the raw color instead of RGBA
Fixes
- VoiceJoin events now fire with updated muted/deafened status
- Slowmode property is now copied with Channel#createCopy
- ContextException are now fired properly again
- The ADMINISTRATOR permission is no longer checked when set on permission overrides
Gradle
repositories {
jcenter()
// Required for OkHTTP 3.13.0-SNAPSHOT
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
dependencies {
compile 'net.dv8tion:JDA:3.8.2_459'
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.8.2_459</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
<repository> <!-- Required for OkHTTP 3.13.0-SNAPSHOT -->
<id>sonatype</id>
<name>sonatype-snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
v3.8.1 | Slowmode - Chunking timeout - No more complete() in callbacks
Due to deadlocks in code of less experienced programmers (and even experienced ones) we now prohibit usage of complete()
in callbacks of RestAction#queue
. This means code similar to the following will no longer work and throw an exception (in the callback).
channel.sendMessage("hello there").queue(message -> {
message.editMessage("hello world").queue(); // this is still fine
message.delete().complete(); // exception
});
Requesting member chunks can cause a shard to not finish connecting when discord fails to respond. This issue has been known for quite a while and can now be handled properly by JDA thanks to the new setup system introduced in 3.8.0
. Now JDA will re-attempt requesting chunks when nothing was received.
Discord has released slowmode for text channels in servers, this can now be configured through JDA to allow automation by bots.
Pull Requests
PR | Description |
---|---|
#762 | Prevent using complete() in callbacks |
#771 | Cleanup logs |
#773 | Slowmode |
#776 | Configuration for [gateway] sending pools |
#778 | Prevent creation of send and receive systems before ws ready |
#785 | Add DefaultShardManager#setEventManagerProvider and JDA#getEventManager |
#788 | Add timeout mechanic for chunk requests |
Thank you all for your contributions!
Versions
The latest release build: 3.8.1_437
Changelog
Additions
- Various additions for slowmode support
- DefaultShardManagerBuilder#setEventManagerProvider and JDA#getEventManager
- JDABuilder#setGatewayPool as well as similar methods for shard manager
Changes
- You can no longer use
complete()
in queue callbacks closeAudioConnection()
can once again be used in lavaplayer event handlers- The logs for rate-limiter and gateway have been improved (useful for debugging)
Fixes
- Idle audio send-system should no longer cause CPU issues
- UnavailableGuildJoinedEvent should fire again
Deprecation
- DefaultShardManagerBuilder#setEventManager should be replaced with
setEventManagerProvider(...)
Incubating
JDABuilder(AccountType)
may not be available in the futureGame.watching(...)
is not officially releasedGame.GameType.WATCHING
is not officially releasedRichPresence.Party.getMax()
andRichPresence.Party.getSize()
will returnlong
in the futureAudioManager.setSpeakingMode(...)
andAudioManager.getSpeakingMode()
is not officially released
Note the Incubating category which marks things that might change without deprecation phase.
Gradle
repositories {
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.8.1_437'
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.8.1_437</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
v3.8.0 | New shard startup – Easy bulk delete – Cache flags
Due to reports of several issues with shards starting I took the time to completely rewrite all of the startup logic in this release. (#706)
These changes have close to no affect to your codebase apart from one little improvement. I have added GuildReadyEvent
which is fired for every single guild on startup before ReadyEvent
and ReconnectedEvent
are received. This allows guilds to already function without having to wait for everything else to be completed. This means no single guild can keep an entire shard dead. (Users have asked for this).
Because of several caching issues caused by users storing JDA entities such as roles or channels we now changed the cache to use WeakReferences
for things such as Role.getGuild()
.
We highly recommend to just store IDs of entities and a JDA
instance (if needed) to then do:
Role role = jda.getRoleById(modRoleId);
...
More on this issue is talked about in the new troubleshooting page.
Deleting messages was really annoying in the past with JDA, until now!
Simply use MessagePaginationAction#takeAsync(...)
and MessageChannel#purgeMessages(...)
.
Example:
MessageChannel channel = event.getChannel();
if (event.getMessage().getContentRaw().equals("--purge")) {
channel.getIterableHistory().takeAsync(500)
.thenAccept(channel::purgeMessages);
}
Oh and one more thing... we added a CacheFlag
enum to disable some parts of the JDA cache to be more lightweight.
EnumSet<CacheFlag> disabled = EnumSet.of(CacheFlag.GAME, CacheFlag.EMOTE);
JDABuilder builder = new JDABuilder(BOT_TOKEN);
builder.setDisabledCacheFlags(disabled);
I highly recommend only using
setDisabledCacheFlags
for backwards compatibility.
Pull Requests
PR | Description |
---|---|
#674 | Improve gradle builds and debugging |
#700 | Add jump-to URL for Messages |
#705 | Add more configurations to JDABuilder |
#706 | Rewrite for guild setup system |
#709 | Better group Invite support |
#721 | Improve use of MDC |
#722 | Add South African server region |
#726 | Make use of WeakReference for upstream references |
#731 | Add Permission.PRIORITY_SPEAKER |
#732 | Add support for new sending modes |
#734 | Support getting ban by Id |
#735 | Add support for getting webhooks by id |
#738 | Change minimum channel name length to 1 |
#740 | Add support to retrieve emotes via RestAction access |
#741 | Added retrieveUserById to ShardManager |
#745 | Add new annotations for common documentation concerns |
#747 | Fix IllegalArgumentException on TextChannel#canTalk() |
#748 | Patch upstream reference |
#749 | Add request exceptions to cause of ErrorResponseException |
#750 | Add purgeMessages methods for convenient message deletions |
#751 | Allow [embed] titles without TLD |
#752 | Fix NullPointerException in EmoteImpl#getGuild() |
#754 | Add ThreadLocalReason |
#756 | Prevent creation of audio manager for uncached guilds |
#757 | Replace Emote#hasRoles to avoid ambiguity |
#758 | Update documentation of JDABuilder and add new constructor overloads |
#761 | Fix ShardManager#getGuildById |
#764 | Cleanup RTP handling |
#766 | Make AudioWebSocket a subordinate class |
#769 | Fix granting / denying permissions [in PermOverrideManager] |
#770 | Only update lastFrameSent when actually sending something |
Thank you all for your contributions!
Versions
The latest release build: 3.8.0_423
Changelog
Additions
- ThreadLocalReason to set thread specific audit log reasons
- Group invite support
- JDABuilder#setCacheFlags, and CacheFlag enum
- MessageChannel#purgeMessages
- PaginationAction#takeAsync and PaginationAction#takeAsyncRemaining
- ShardManager#retrieveUserById
- Guild#retrieveEmote, Guild#retrieveEmoteById, and Guild#retrieveEmotes
- JDA#getWebhookById
- JDA#awaitStatus and JDA#awaitReady
- JDABuilder#setCallbackPool, JDABuilder#setRateLimitPool, and JDABuilder#setHttpClient
- Permission.PRIORITY_SPEAKER and AudioManager#setSpeakingMode
- Region.SOUTH_AFRICA and Region.VIP_SOUTH_AFRICA
- Message#getJumpUrl
Changes
- JDABuilder will now only have a single build method `build()` and can be made blocking by calling
JDA#awaitReady()
on the built JDA instance - JDA cache can now partially be disabled to reduce memory impact
- JDA now uses
WeakReference
internally to avoid memory leaks and issues coming from user code
Fixes
- Several fixes for audio receiving and sending
- Several fixes for shard startup (rewrite)
- Usage of SLF4J MDC has been improved
Deprecation
- Removed previously deprecated methods in WebhookMessage and WebhookMessageBuilder
- Deprecated legacy build methods
buildAsync()
andbuildBlocking()
for newbuild()
andawaitReady()
methods - Deprecated Emote#hasRoles to avoid ambiguity. Use Emote#canProvideRoles
Incubating
JDABuilder(AccountType)
might be removed in a future versionGame.watching
andGameType.WATCHING
are not officially releasedRichPresence.Party.getMax()
and..getSize()
will be changed to return `long`AudioManager.setSpeakingMode
and..getSpeakingMode
are not officially released
Note the new Incubating category which marks things that might change without deprecation phase.
Gradle
repositories {
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.8.0_423'
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.8.0_423</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
v3.7.1 | Hotfix for DefaultSendSystem
This fixes a bug introduced by 3.7.0 which causes the DefaultSendSystem to fail delivering packages.
Pull Requests
PR | Description |
---|---|
#714 | Add getGuildsByName to ShardManager |
Thank you all for your contributions!
Versions
The latest release build: 3.7.1_385
Changelog
Additions
+ AddgetGuildsByName
to ShardManager
Fixes
- Fixed issue with DefaultAudioSendSystemGradle
repositories {
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.7.1_385'
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.7.1_385</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
v3.7.0 | Better Opus Library Support / New Audio Encryption Modes
The opus libraries used for encoding/decoding are now exported to their own dependency at opus-java. This allows for a smaller artifact if no audio encoding has to be performed by JDA (like just sending with lavaplayer).
You can find out how to exclude the dependency and consecutively decrease your classpath size by looking at the Download Section in the README.
We additionally now host a jar without opus natives on jenkins (suffix noOpus
).
Discord has added new encryption modes to replace old ones, we now implement all currently supported encryption modes for audio. Additionally we reduced the amount of required allocations for sending audio, which should reduce garbage accumulation and CPU usage respectively.
Pull Requests
PR | Description |
---|---|
#651 | Voice Gateway V4 and new encryption modes |
#655 | Added enum to represent the flags set on RichPresence |
#658 | Clear expected member chunks on delete |
#659 | Externalize opus binaries |
#660 | Proper closing of resources in MessageAction |
#664 | Fixed issues with permission management in RoleManager |
#665 | Permission#VOICE_MOVE_OTHERS does not grant access to a voice channel |
#669 | Updated invite pattern to only trigger on alphanumeric with underscore and dash |
#670 | Cleaned up BotRateLimiter for better handling of partial/missing headers |
#671 | Add unicode flag emoji for each Region |
#675 | Allow null user_id and provide partial Webhooks [in audit logs] |
#676 | Added possibility to sync Permissions between channels |
#678 | Additional invite info |
#680 | Ability to add members to guilds |
#681 | Add support for sending multiple files with a webhook |
#684 | Fixing Role#getAsMention() for public Role |
#685 | Add option to exclude deprecated voice regions |
#687 | Improve snowflake checks for rest requests |
#692 | Add proper boundaries to methods |
#694 | Don't call toString() eagerly on arguments to format() |
#703 | Add Guild Features to Invite |
#713 | Complete rest action on internal server errors |
Thank you all for your contributions!
Versions
The latest release build: 3.7.0_382
Changelog
Additions
+++ Webhooks can now send multiple files in one message++ Bots can now add members to guilds (oauth2 access required)
+ Region enum now contains unicode flags
+ We now offer an ability to sync channel permissions for a channel in ChannelManager
+ You can now see webhook information in Audit-Logs
+ Can now specify custom opus library
+ Now giving access to member counts in invites
+ We now expose the flags on RichPresence
Changes
- JDA now uses the voice gateway version 4- Audio transmission now supports lite and suffix encryption
- Audio transmission now uses less allocations for each package to produce less garbage
- Using
getAsMention()
on the public role now properly returns @everyone
Fixes
- RestActions should now complete for continuous 500 responses (internal server errors)- Resources added to MessageAction should now be closed properly on clearing files
- Permission management in RoleManager is now improved
- WebhookManager#setChannel should now properly update the channel
- Improved handling of rate limit headers
- Audit-Logs should now handle null user_ids properly
- RestAction callbacks now use proper generics boundaries such as
? super T
- AFK-Channel setting in GuildManager should work properly now
- Permission checks in openAudioConnection have been corrected, VOICE_MOVE_OTHERS should not grant VOICE_CONNECT
- Invite parsing in Message should now only trigger on alphanumeric with dash
Deprecation
- Removed old updatable managers and associated classes/methods deprecated- Removed several old methods in events to be replaced by new consistent method names
Gradle
repositories {
jcenter()
}
dependencies {
compile 'net.dv8tion:JDA:3.7.0_382'
}
Maven
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.7.0_382</version>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
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>