Releases: Javacord/Javacord
v3.8.0
Starting in early 2023, support for Java 8 will be discontinued and Java 11 will be the new minimum requirement for using Javacord.
If you are not yet running Java 11+, we strongly recommend that you upgrade before the end of this year.
π¦ Download
Using a Build Manager
Gradle
repositories { mavenCentral() }
dependencies { implementation 'org.javacord:javacord:3.8.0' }
Maven
<dependency>
<groupId>org.javacord</groupId>
<artifactId>javacord</artifactId>
<version>3.8.0</version>
<type>pom</type>
</dependency>
Sbt
libraryDependencies ++= Seq("org.javacord" % "javacord" % "3.8.0")
π Changelog
Improvements
- Added support for text in Voice (#1014) by @felldo
- Added
TextableRegularServerChannel
which contains shared methods for text related functionality of RegularServerChannels (#1014) by @felldo - Internal: Change generate changelog gradle task to mention the author next to the changelog instead of the dedicated contributors section (#1192) by @felldo
- Added ability to set a command as nsfw (#1193) by @RealYusufIsmail
- Updated jackson-databind to version 2.12.7.1 in response to multiple CVEs. (#1207) by @Saladoc
- Added convenience methods to check timeout permissions. (#1208) by @RealYusufIsmail
- Added
SUPPRESS_NOTIFICATIONS
message flag (#1213) by @RealYusufIsmail - Changed deprecated IP Discovery UDP packet size to 74 which is required from the 15.03.23 onwards. IMPORTANT Everyone who is using voice has to upgrade until then otherwise it will no longer work (#1216) by @felldo
Bugfixes
- Fixed a bug where
canWrite
and more methods return always true for Threads (#1014) by @felldo - Fixed
NullPointerException
when passing downnull
inTextInputBuilder#setValue
(#1204) by @ShindouMihou - Fixed a bug when receiving a SelectMenuInteraction where it would throw an error if there is a link button in the components too of the message and fixed checking for the wrong keys
min/max_values
so getting these values (getMaximumValues
) would always return 1 (#1206) by @felldo
v3.7.0
Starting in early 2023, support for Java 8 will be discontinued and Java 11 will be the new minimum requirement for using Javacord.
If you are not yet running Java 11+, we strongly recommend that you upgrade before the end of this year.
π¦ Download
Using a Build Manager
Gradle
repositories { mavenCentral() }
dependencies { implementation 'org.javacord:javacord:3.7.0' }
Maven
<dependency>
<groupId>org.javacord</groupId>
<artifactId>javacord</artifactId>
<version>3.7.0</version>
<type>pom</type>
</dependency>
Sbt
libraryDependencies ++= Seq("org.javacord" % "javacord" % "3.7.0")
π Changelog
Improvements
- Added "nsfw" field to
ServerVoiceChannel
(#1127) - Added message reply listeners (via
Message#addMessageReplyListener
) (#1139) - Added support for select menus v2 (#1150)
- Deprecated
SelectMenu#create
methods in favor of#createStringMenu
(#1150) - Added the ability to get a thread member by their user id. (#1155)
- Deprecated
getThreadMembers
in favor ofrequestThreadMembers
(#1155) - Added
SlashCommand#getMentionTags
to get all mention tags of all subcommands (#1157) - Added new
RestRequestResultErrorCodes
50039
and40062
(#1163) - Added missing builder methods for setting the
emoji
property to a unicode emoji on Select Menu Options (#1166) - Changed how the
delete_message_seconds
field is set when banning a user from as query parameter to the request json body (#1167) - Added
MessageDecoration#applyToText(String)
which applies the decoration to a given string (#1169) - Added new Javacord compatible library
Discord Interaction handler
and removedsdcf4j
because it is deprecated (#1175) - Added
ApplicationCommandInteraction#getRegisteredCommandServerId
andgetRegisteredCommandServer
to get the id/server the command is registered on from an application command interaction (#1176) - Deprecated
ApplicationCommand#deleteGlobal
anddeleteForServer
in favor ofdelete
(#1177) - Added
Message#canYouReadContent
which checks if you can read the content of a message if you do not have theMESSAGE_CONTENT
intent enabled to cover special cases like DMs, bot mentions or your own messages (#1185)
Bugfixes
- Fixed MessageUpdater not removing attachments when replacing the message although no new attachments are added (#1168)
- Fixed moving the audio connection to the new ServervoiceChannel if the bot gets moved (#1170)
- Fixed not closing the audio connection when kicking the bot from a ServerVoiceChannel (#1170)
- Fixed wrong links in README (#1178)
- Fixed not working contributing guidelines link in PR template (#1181)
Breaking Changes
- Removed obsolete application owner methods (#1147)
- Removed some banning server member methods (#1147)
- Renamed
downloadAsXY
methods toasXY
(#1147) - Moved some methods from
VoiceChannel
toServerVoiceChannel
(#1147) - SelectMenuBuilder now requires a
SELECT_MENU_*
component type and acustom_id
to be instantiated. (#1150) get/requestSticketById(String)
methods do no longer throw an exception when the id is being parsed and instead return an empty optional or complete exceptionally with the number parsing exception (#1156)SlashCommand#getMentionTag
now returns the mention tag with only the base command (#1157)- Renamed
SlashCommand#getFullCommandName
to#getFullCommandNames
and changed return type toList<String>
(#1157) - Renamed
SlashCommandOptionsProvider
methods that are only usable for arguments of a slash command fromgetOption*
togetArgument*
and changed the implementation from getting the options from the option to getting always the command arguments if there are any (#1171) - Throw an exception when the content of a message is accessed without having the
MESSAGE_CONTENT
enabled (#1182)
Contributors in this release:
@Bastian (#1188, #1189, #1190)
@felldo (#1150, #1156, #1157, #1168, #1169, #1170, #1171, #1175, #1176, #1177, #1179, #1181, #1182, #1185)
@Lainika (#1172)
@Mysterypotatoguy (#1139, #1166)
@RealYusufIsmail (#1127, #1155, #1163, #1167)
@Saladoc (#1147, #1154)
@haseeb-xd (#1178)
v3.6.0
Starting in early 2023, support for Java 8 will be discontinued and Java 11 will be the new minimum requirement for using Javacord.
If you are not yet running Java 11+, we strongly recommend that you upgrade before the end of this year.
π¦ Download
Using a Build Manager
Gradle
repositories { mavenCentral() }
dependencies { implementation 'org.javacord:javacord:3.6.0' }
Maven
<dependency>
<groupId>org.javacord</groupId>
<artifactId>javacord</artifactId>
<version>3.6.0</version>
<type>pom</type>
</dependency>
Sbt
libraryDependencies ++= Seq("org.javacord" % "javacord" % "3.6.0")
π Changelog
Highlights in this release:
- We're now even contributor-friendlier with issue templates and the all-contributors specification.
- Support for applications being owned by teams
- Out-of-the-box support for delayed deletion of entities.
- Support for message interactions
Improvements
- Added support for slash command mentions (#1137, #1140)
- Added support for component-only messages (#1120)
- Increased the granularity of the message removal duration when banning members (#1113)
- Added convenience methods for creation of nested slash commands (#1111)
- internal Switched to session-specific resume urls (#1102)
- Added server features, including widgets and welcome screens (#1096, #1123)
- Added support for the
replied user
mention (#1091) - Improved error handling on replying to messages that no longer exist (#1090)
- Added number of messages to thread metadata (#1089)
- Added position in thread to
Message
(#1088) - Added support for message interactions (#1078)
- Switched to discord api / gateway version 10 (#1073)
- Added message content intent (#1073)
- Improved attachment handling when updating messages (#1073)
- Added description support for message attachments (#1072)
- Exposed boosting and avatar metadata for members (#1070)
- Added message flags to
Message
instances (#1051) - Added ability to get full name of a slash command (#1050)
- Added support for min and max length of String parameters in slash commands (#1047)
- Added capabilities for scheduled / delayed deletion (#1038)
- Removed hard-coded rate limits (#973)
- Renamed download methods for consistency (#641)
- Added permission checks for
ServerVoiceChannel
(#638)
Bugfixes
- Fixed thread channels mistakenly being removed from cache (#1136)
- Fixed
ServerThreadChannelChangeInvitableEvent
possibly being thrown for public threads (#1133) - Fixed audio connection not being cleaned up when leaving a server (#1125)
- Fixed ConcurrentModificationException when updating custom emojis (#1124)
- SAME-RELEASE Fixed empty attachments object (#1122)
- Fixed javadoc build with Java 13+ (#1107)
- SAME-RELEASE Fixed NPE with
Server
(#1104, #1130) - Fixed updates to the bot user being ignored (#1052)
- Fixed memory leaks with the event queues and sticker sets (#1045)
- Fixed issues with updates for uncached roles (#942)
Breaking Changes
- Removed outdated server features (#1096)
- Removed
has(Boost|Join)MessagesEnabled
methods fromServer
(#1096) - Extracted thread metadata into separate
ThreadMetadata
class (#1094) - Changed signature of
MessageEditEvent
to now give twoMessage
instances for comparison (#1051) - Removed description parameters for context menu commands (#1049)
- Stickers are no longer shared across shards (#1045)
- Changed return types from collections to more appropriate types across the API (#974)
- Changed Application ownership return types (#968)
- Removed deprecated
addFile
methods (#925)
v3.5.0
Starting in early 2023, support for Java 8 will be discontinued and Java 11 will be the new minimum requirement for using Javacord.
If you are not yet running Java 11+, we strongly recommend that you upgrade before the end of this year.
π¦ Download
Using a Build Manager
Gradle
repositories { mavenCentral() }
dependencies { implementation 'org.javacord:javacord:3.5.0' }
Maven
<dependency>
<groupId>org.javacord</groupId>
<artifactId>javacord</artifactId>
<version>3.5.0</version>
<type>pom</type>
</dependency>
Sbt
libraryDependencies ++= Seq("org.javacord" % "javacord" % "3.5.0")
π Changelog
Highlights in this release:
- Added support for new slash command permissions
- Added support for interaction locales
- Added support for server timeouts
- Added support for slash command attachment options
Improvements
- Added
UserFlag#CERTIFIED_MODERATOR
andUserFlag#BOT_HTTP_INTERACTIONS
(#762) - Added locales for interactions (#947)
- Improved BotInviteBuilder (#957)
- Added Modal interactions (#962)
- Added support for server timeouts (#948)
- Added support for disabling event dispatching (#986)
- Added support for ban pagination (#993)
- Added ActivityFlag (#996)
- Added missing/new Activity fields (#1000)
- Added support for editing slash commands without a server instance (#1001)
- Added
MessageType#THREAD_CREATED
(#1008) - Updated dependencies (#944, #1013)
- Added dummy implementation for forum channels (#1009)
- Added unknown channels to prevent errors for newly introduced channels (#1009)
- Added support for slash command attachment options (#1015)
- Added support for new slash command permissions (#1004, #1027)
Bugfixes
- Fixed
ServerTextChannel#hasSlowmode()
(#731) - Fixed
SlashCommandInteraction
not properly parsing resolved users (#953) - Fixed exception when guilds are missing voice states (#929)
- Fixed
DiscordApi#getMessageById(...)
returning cached messages from other channels (#963) - Fixed
ServerThreadChannelBuilder#setInvitableFlag(...)
(#966) - Fixed audit log reason not supporting non-ASCII characters (#971)
- Fixed webhooks and interactions consuming global ratelimits (#972)
- Fixed
DiscordApi#hasAllUsersInCache()
(#975) - Fixed exception when no
nsfw
field is present in channel category updates (#981) - Fixed
Server#getBans(...)
only returning the latest 1000 bans (#993) - Fixed unwanted log message (#1002)
- Fixed wrong initial mute and deafen member state (#736)
- Fixed exception for servers with forum channels (#1009)
- Fixed duplicate message object creation for messages with attachments (#1017)
- Fixed AssertionError for ServerThreadChannels (#1029)
Breaking Changes
- Removed
UserFlag#SYSTEM
and renamed others (#762) - Removed deprecared methods in
Message
,LocalRatelimiter
, andSlashCommandInteractionOptionsProvider
(#847, #882) - Removed
SafeSpecializable
interface (#880) - Renamed
Rename PermissionType#READ_MESSAGES
toVIEW_CHANNEL
(#952) - Removed support for broken and deprecared login with user accounts (#576)
- Removed
InteractionCallbackDataFlag
(#961) - Changed return type of
Message#getMentionedChannels()
fromList<ServerTextChannel>
toList<ServerChannel>
(#1012) - Removed support for old slash command permissions (#1004)
π¦ Download
Using a Build Manager
Gradle
repositories { mavenCentral() }
dependencies { implementation 'org.javacord:javacord:3.4.0' }
Maven
<dependency>
<groupId>org.javacord</groupId>
<artifactId>javacord</artifactId>
<version>3.4.0</version>
<type>pom</type>
</dependency>
Sbt
libraryDependencies ++= Seq("org.javacord" % "javacord" % "3.4.0")
Manually
The javacord-3.4.0-shaded.jar
file contains Javacord and all its dependencies.
π Changelog
Highlights in this release:
- Added support for threads
- Added support for stickers
- Improved support for interactions / slash commands (context menus, autocomplete, ...)
- Many bugfixes
Improvements
- Added option to control user cache (#816)
- Add
Server#requestMember(long)
to get a server member by their user id (#684) - All message components listeners are now attachable to messages (#820)
- Added
DiscordApi#getKnownCustomEmojiOrCreateCustomEmoji(...)
to get custom emojis from different shards (#830) - Added ability to edit message with message builder (#810)
- Allow ephemeral deferred interaction responses (#838)
- Added disabled field for Button convenience methods (#849)
- Added missing methods to get the actual component (#850)
- Added support for number slash command option type (#852, #919)
- Remove members from cache when the bot leaves the server (#855)
- Use 64 bit for permission bitmask (#861)
- Added new permission types (#862)
- Added
MessageAttachment#isEphemeral()
(#870) - Added new appender types to the MessageBuilder (#869)
- The
GUILD
intent is now automatically set (#868) - Added new audit log action types (#872)
- Allow voice self-states to be set directly on connect (#877)
DiscordApi#disconnect()
now returns a future (#884)- Added support for threads (#864, #905, #907, #930)
MessageAuthor#getAvatar(...)
now accepts an optional size parameter (#902)- Added support for stickers (#904)
- Added method to manually request members + ServerMembersChunkEvent (#818)
- Added support for min and max value setting of slash command options (#891)
- Update Log4J api version (#922)
- Added ServerThreadChannelUpdater and ServerThreadChannelBuilder (#903)
- Improved
MessageSet
to utilize performance-improvements from newer Stream methods likeStream#takeWhile(...)
(#938) - Added support for context menus (#867)
- Added support for autocomplete interactions (#939, #943, #945)
Bugfixes
- JavaDoc Fixes and Improvements (#828, #854, #863, #875, #876)
- Fixed incoming interaction in unknown DM channels (#835)
- Fixed MessageBuilder for messages with multiple embeds (#837)
- Fixed
User#getMutualServers()
(#821) - Fixed
SlashCommandInteractionOption#getBooleanValue()
(#841) - Changed
SlashCommandInteractionOption#isSubcommandOrGroup()
to check the st 8000 ring representation instead of string value (#872) - Moved from deprecated "embed" field to "embeds" in UncachedMessageUtil (#848)
- Fixed message cache deadlock (#860)
- Fixed NPE in MessageBuilderBaseDelegateImpl when a list of embeds contains a null entry (#913)
ServerVoiceChannelEvent
now extendsServerChannelEvent
(#918)- Fixed NPE in
SlashCommandInteractionOptionImpl#getUserValue()
(#921) - Fixed NPE in SelectMenuInteractionImpl (#926)
- Added missing interfaces to
SelectMenuChooseEvent
andServerChangeRulesChannelEvent
(#936) - Replaced hard coded discord CDN with the already static defined (#886)
- Add methods to prevent ambiguous methods for
sendMessage(...)
variants (#912) - Fixed method signatures of bulk overwrite application command methods (#940)
Breaking Changes
- Changed return type of
User#getMutualServers()
fromCollection<Server>
toSet<Server>
(#821) - Changed message methods that take embed as argument only to needing an array of embeds (#856, #873)
- Removed
MessageComponentInteractionBase#getMessageId()
(#846) - Changed return type of
MessageComponentInteractionBase#getMessage()
fromOptional<Message>
toMessage
(#846) InteractionMessageBuilder#setFlags(...)
now expectsInteractionCallbackDataFlag
instead ofMessageFlags
enums as parameters (#871)- Changed return type of
DiscordApi#disconnect()
fromvoid
toCompletableFuture<Void>
(#884) - Changed return type of
ChannelCategory#getChannels()
fromList<ServerChannel>
toList<RegularServerChannel>
(#864) - Moved position related methods from
ServerChannel
toRegularServerChannel
(Threads do not have a position) (#864) - Replaced
SlashCommandInteractionOption#getIntValue()
withSlashCommandInteractionOption#getLongValue()
andSlashCommandOptionChoiceBuilderDelegate#setValue(int)
withSlashCommandOptionChoiceBuilderDelegate#setValue(long)
(#899) - Fixed inconsistent slash command option naming (#919)
- Moved
canCreateInstantInvite
and permission methods from theServerChannel
to the newRegularServerChannel
(#903) - Moved permission methods from
ServerChannel[Updater|Builder]
toRegularServerChannel[Updater|Builder]
(#903)
Deprecations
- Deprecated
MessageBuilder#addFile(...)
in favor ofMessageBuilder#addAttachment(...)
- Deprecated
SlashCommandInteractionOptionsProvider#get[First|Second|Third]Option[Boolean|Long|User|...]Value()
in favor ofgetOption[Boolean|Long|User|...]ValueByIndex(...)
v3.3.2
π¦ Download
Using a Build Manager
Gradle
repositories { mavenCentral() }
dependencies { implementation 'org.javacord:javacord:3.3.2' }
Maven
<dependency>
<groupId>org.javacord</groupId>
<artifactId>javacord</artifactId>
<version>3.3.2</version>
<type>pom</type>
</dependency>
Sbt
libraryDependencies ++= Seq("org.javacord" % "javacord" % "3.3.2")
Manually
The javacord-3.3.2-shaded.jar
file contains Javacord and all its dependencies.
π Changelog
This version includes an important fix for slash commands and adds support for select menus.
Improvements
- Add support for select menus (#800)
Bugfixes
- Fix slash commands in private channels and buggy ephemeral messages(#801)
v3.3.1
π¦ Download
Using a Build Manager
Gradle
repositories { mavenCentral() }
dependencies { implementation 'org.javacord:javacord:3.3.1' }
Maven
<dependency>
<groupId>org.javacord</groupId>
<artifactId>javacord</artifactId>
<version>3.3.1</version>
<type>pom</type>
</dependency>
Sbt
libraryDependencies ++= Seq("org.javacord" % "javacord" % "3.3.1")
Manually
The javacord-3.3.1-shaded.jar
file contains Javacord and all its dependencies.
π Changelog
This version adds support for slash commands, buttons, and many other smaller features.
It also includes various bugfixes.
Improvements
- Add support for slash commands (#672, #793, #792, #791, #787, #786, #777, #779, #776, #768, #774, #739, #773, #750, #675)
- You can find more information in the new wiki article for slash commands: Slash Commands
- Add support for buttons (#758, #775)
- You can find more information in the new wiki article for buttons: Buttons
- Add support for membership screening pending status (#790)
- Add support for sending multiple embeds (#789)
- Add support for server NSFW levels (#785)
- Add support for role tags (#738)
Bugfixes
- Fix NullPointerExceptions in event dispatcher (#698)
- Fix incoming webhooks without a token (#778)
- Fix issue for message references without a message id (#782)
- Use millisecond precision for Cloudfare ratelimits (#756)
- Fix broken
UserChangeXyz
events (#742) - Fix unwanted request identify ratelimit on resume (#694)
- Fix settings of default global ratelimiter (#749)
- Fix broken channel update handler for server news channels (#743)
Deprecations
Message#getReferencedMessageId()
has been deprecated in favor ofMessage#getMessageReference()
(#782)
v3.3.0
π¦ Download
Using a Build Manager
Gradle
repositories { mavenCentral() }
dependencies { implementation 'org.javacord:javacord:3.3.0' }
Maven
<dependency>
<groupId>org.javacord</groupId>
<artifactId>javacord</artifactId>
<version>3.3.0</version>
<type>pom</type>
</dependency>
Sbt
libraryDependencies ++= Seq("org.javacord" % "javacord" % "3.3.0")
Manually
The javacord-3.3.0-shaded.jar
file contains Javacord and all its dependencies.
π Changelog
Improvements
- Add new message types (#730)
Bugfixes
- Fix broken message create events for private messages (#708)
- Fix broken update events for users (#685)
Breaking Changes
PrivateCHannel#getRecipient()
now returns anOptional<User>
v3.2.0
π¦ Download
Using a Build Manager
Gradle
repositories { mavenCentral() }
dependencies { implementation 'org.javacord:javacord:3.2.0' }
Maven
<dependency>
<groupId>org.javacord</groupId>
<artifactId>javacord</artifactId>
<version>3.2.0</version>
<type>pom</type>
</dependency>
Sbt
libraryDependencies ++= Seq("org.javacord" % "javacord" % "3.2.0")
Manually
The javacord-3.2.0-shaded.jar
file contains Javacord and all its dependencies.
π Changelog
It is recommended to update your bot or your might experience issues with servers that have the new stage channels
Improvements
- Allow sending messages to webhooks (#573)
- Improve allowed mentions (#587).
- Add methods to get the target of an invite (#616)
- Add
Message#getNonce()
(#650) - Update to latest Gateway and REST endpoints (#679)
- Add support for replies (#679)
- Editing a message now returns the message (#650)
- Add
Message#crossPost()
(#650) - Add methods to ban a user by their id (#667)
- Add basic support for new stage channel type (#726)
- Add support for multiple activities (#692)
Breaking Changes
Icon#asInputStream
now returns an InputStream directly instead of a future (#448)AllowedMentions#getAllowedRoleMentions()
and#getAllowedUserMentions
now return anOptional<List<Long>>
instead ofList<Long>
(#587)- Removed
AllowedMentionsgetGeneralMentions()
- Changed return type of
RichInvite#getInviter()
toOptional<User>
moved it toInvite#getInviter()
(#616) - Editing a message now returns
CompletableFuture<Message>
instead ofCompletableFuture<Void>
(#650) Webhook#getToken()
was moved toIncomingWebhook
and now returnsString
(#573)
Bugfixes
v3.1.2
π¦ Download
Using a Build Manager
Gradle
repositories { mavenCentral() }
dependencies { implementation 'org.javacord:javacord:3.1.2' }
Maven
<dependency>
<groupId>org.javacord</groupId>
<artifactId>javacord</artifactId>
<version>3.1.2</version>
<type>pom</type>
</dependency>
Sbt
libraryDependencies ++= Seq("org.javacord" % "javacord" % "3.1.2")
Manually
The javacord-3.1.2-shaded.jar
file contains Javacord and all its dependencies.
π Changelog
Improvements
- Added
Server#requestOwner()
method (#639) - Added
ActivityType.COMPETING
(#645) - Added
User#getUserFlags()
(i.e., badges) (#637) - Added events for invite creation and deletion (#644)
- Added utility method to convert a message's content to a readable string without access to the message object (#640)