Skip to content
Apr 6, 2021
Release version '3.2.0-M3'.

@quanticc quanticc released this Apr 7, 2021

Discord4J 3.1.5 is now available on Maven Central. Most notably, this release fixes a regression in 3.1.4 regarding VoiceStates so if you use voice features, we strongly recommend this upgrade.

⭐️ New features

  • Add acknowledgeEphemeral for interactions 5d3b04e
  • Add InteractionResponse::deleteFollowupMessage cb22588
  • Add public accessors for IDs in rest* entities #880
  • Add "loading" message flag #883
  • Update message types for API v6 #884
  • Add initial support for Stage channels #885
    • Mostly intended to suppress deserialization errors
  • Add pending field to MemberUpdateEvent #886

🐞 Bug fixes

  • VoiceChannel::getVoiceStates or retrieving a role by ID through REST returns empty #878 #879
  • Send silence on connect to properly receive audio on startup 0a3648c
    • Fixes having to send audio first to allow receiving audio packets

🔨 Dependency upgrades

  • discord-json 1.5.10

💜 Contributors

Thanks to our contributors and collaborators who helped in this release!
@Shadorc @NovaFox161 @darichey

Assets 2
Mar 30, 2021
Release version '3.2.0-M2'.

@quanticc quanticc released this Mar 29, 2021

Discord4J 3.1.4 is now available on Maven Central. We recommend this upgrade to all users, packing many new features and bug fixes.

⚠️ Known issues

  • Calling VoiceChannel::getVoiceStates() or retrieving a role by ID through REST will yield an incorrect result due to a bug after migrating to our new ID backend #879
    • Fixed in 3.1.5

⭐️ New features

  • Add support for slash commands / interactions feature #823 #855 #830 #860 #864
    • Check #818 for some examples about how to use the feature
    • Slash commands are in current development and therefore marked as "Experimental" in Discord4J (API and behavior can change between minor releases!)
  • Reduce memory usage of JDK entity store by saving Snowflakes as long instead of String #872
  • Add member pending field for membership screening feature #819
  • Add with_counts query param to GET guild #826 #795
  • Allow retrieving raw data objects from entities #836 #829
  • Improvements to ChangeKey values for audit logs #862
  • Conserve order for user mentions, role mentions and reactions on message #857
  • Add support for guild templates #876 #791
  • Add ReactiveEventAdapter::from to combine multiple adapters 6b9fe05

🐞 Bug fixes

  • Moving bot to another voice channel causes 4014 error and disconnect #824 858a97c
  • Gateway payloads memory leak #822 41c54d2 53201ba
  • Regression, JSON decoding error on bots calling member.getPresence() on themselves #838 2a6c233
  • VoiceSocket error when connecting to voice channel #849 e476bc2
  • Avatar URL is not updated for PresenceUpdateEvent #861 c57794d
  • Trace logging issues at RequestStream using Log4J2 + doOnEach 88ee4d7
  • Save missing Member fields on guild member updates db5e1f2

📔 Documentation

🔨 Dependency upgrades

  • Reactor Dysprosium-SR18
  • Jackson 2.11.4
  • Stores 3.1.6
  • discord-json 1.5.9

💜 Contributors

Thanks to our contributors and collaborators who helped in this release!
@Shadorc @UnderMybrella @p4czyk @kvnxiao @BButner @Redstoneguy129 @darichey

Assets 2

@quanticc quanticc released this Dec 10, 2020

Discord4J 3.1.3 is now available on Maven Central. This is a recommended upgrade to all users polishing some edges in our previous release while still packing new features.

⭐️ New features

  • Add support for role tags #812
  • Allow setting a default allowed mentions object when building a DiscordClient through setDefaultAllowedMentions e9d7a32
  • Add guild preview details to RestGuild #814
  • Improve exception message when using an invalid token, like a client secret
  • Add setAllowedMentions to MessageEditSpec #817

🐞 Bug fixes

  • Fix incorrectly building MessageReferenceData when using the inline replies feature
  • Update bot's presence through gateway when requested through Member::getPresence #813

🔨 Dependency upgrades

  • Reactor Dysprosium-SR15, including reactor-core 3.3.12 and reactor-netty 0.9.15
  • Jackson 2.11.3

💜 Contributors

Thanks to @Shadorc for helping us towards this release

Assets 2

@quanticc quanticc released this Nov 23, 2020

Discord4J 3.1.2 is now available on Maven Central. This is a recommended upgrade to all users.

⚠️ Known issues

  • If you need to use inline replies feature from core module, use v3.1.3 or higher.

⚠️ Update considerations

  • Due to the recent Gateway Intents changes, a timeout was introduced to methods like getMembers and requestMembers in case you trigger a known issue when not specifying intents (as they are optional in 3.1.x) while also not enabling privileged intents in your Developer Portal.
  • This timeout can be configured in GatewayBootstrap::setMemberRequestTimeout and it defaults to 10 seconds. It is NOT applied if you specify intents when connecting to the Gateway.
  • Learn more about intents here and here.

⚠️ Behavior change

  • Experimental: errors thrown from GatewayBootstrap::withEventDispatcher function will now cause a bot to log out. This is a behavior change from previous version on an API marked as Experimental. To retain previous behavior make sure you handle all error sources.

⭐️ New features

  • Add support for inline replies #789 #809. See known issues above.
  • Add support for extracting stickers from Message objects #808
  • Add retrying capabilities to HTTP 520 errors #802 #804
  • Add IntentSet.nonPrivileged() 766e768
  • Add methods for obtaining an existing, registered VoiceConnection to associated entities #783
  • Add support for ReactiveEventAdapter through GatewayDiscordClient::on and EventDispatcher::on, allowing a more listener-like approach to event subscription a5d6153
  • Update Integration support #794
  • Add VoiceStateUpdateEvent functions to determine the kind of event #770
  • Allow enabling unpooled inbound allocation method. This can help debugging leak issues eae077b
  • Add overload to Guild::requestMembers by user ID set 4059ded
  • Reject voice connections if missing voice states intent 7d2dbeb
  • Add timeout to incompatible full member list requests b36af22
  • Deprecate PrivateChannelCreateEvent #786
  • Add subscriber context to GatewayDiscordClient::on(Class, Function) 14dab2c
  • Forward errors from withEventDispatcher to terminate Gateway connections 03bee01

🐞 Bug fixes

  • Fix voice resume, now it's working as expected #778
  • Fix DefaultVoiceConnectionFactory not releasing resources on cancel/error 62e2526
  • Fix NPE when creating webhook on TextChannel without avatar image #777
  • Migrate deprecated retryWhen in GatewayBootstrap, this will make D4J compatible with Reactor 3.4+ or Spring Boot 2.4+ 8203a98
  • Add integration payloads to the ignored types, avoiding the annoying JSON error messages 56a37c4
  • Fix ValueInstantiationException when GuildCreateEvent contains unavailable guild #801

📔 Documentation

  • Clarify availability of Message::getGuildId #762
  • Update Guild documentation #792
  • Update Community Guild documentation #793

🔨 Dependency upgrades

  • Reactor Dysprosium-SR14, including reactor-core 3.3.11 and reactor-netty 0.9.14

💜 Contributors

Thanks to our contributors that helped us with PRs and ideas for this release: @cameronprater @Shadorc

Assets 2

@quanticc quanticc released this Nov 23, 2020

Discord4J 3.0.16 is now available on Maven Central. This is a patch release in a maintenance-only branch and it's targeted to v3.0.x users who are unable to migrate to v3.1.x yet.

Maintenance mode reminder for 3.0: Please migrate to the 3.1 line by following our guide.

⭐️ New features

  • Add isAvailable to GuildEmoji (#740)
  • Add support for User public flags (#739)

🐞 Bug fixes

  • Add secure() to the default HttpClient, allows connecting to secure voice servers

🔨 Dependency upgrades

💜 Contributors

Thanks to the following contributors that helped in this release: @Shadorc @Doc94

Assets 2
Nov 2, 2020
Release version '3.2.0-M1'.

@quanticc quanticc released this Sep 16, 2020

We're glad to announce that Discord4J 3.1.1 is now available on Maven Central. We recommend this upgrade to all users as it contains a series of bug fixes and new features. Check here for the changelog and here for all closed tickets in this release.

Maintenance mode reminder for 3.0: Please migrate to the 3.1 line by following our guide.

⭐️ New features

  • Add support for channel following #753
  • Add joined_at field to GuildMemberUpdate #757
  • Simpler formatting of ClientException::toString #746
  • Add getOld function to EmojisUpdateEvent #763
  • Add new Color constants for black and white #761
  • Enable debugging gateway outbound capacity 8153d4e
  • Add missing Nullable annotations #754 125bff8
  • Add support for before and limit options to AuditLogQuerySpec #767
  • Add missing RestMessage::deleteReactions #774
  • Add Activity.Type.COMPETING #775
  • Migrate to new retryWhen operator internally. Should solve compatibility issues if running D4J with newer Reactor versions
    2b653f7

⚠️ Update considerations

  • Experimental API change: Update Message::publish return type from Mono<Void> to Mono<Message> #773

🐞 Bug fixes

  • Fix some problematic uses of Possible::get #749
  • Fix unable to connect to secure voice servers #755
  • Fix login can't complete if first connection attempt fails #759
  • Fix login can't complete if supplying a DefaultShardingStrategy #766
  • Fix requests incorrectly iterating across Multimap 83c127b

📔 Documentation

🔨 Dependency upgrades

  • Reactor Netty 0.9.12
  • Jackson 2.11.2

💜 Contributors

Thanks to our contributors that helped us with PRs and ideas for this release: @Alex1304 @TheNumberOne @Shadorc @qwbarch @Doc94

Assets 2

@quanticc quanticc released this Jul 25, 2020

The next major release of Discord4J collects a year's worth of user feedback and experience since the last iteration. Discord4J v3.1.0 is a highly recommended upgrade for all users as it supports latest Discord features like Gateway Intents, Allowed Mentions, Member Loading and also applies our current knowledge of the Reactor runtime, allowing us to deliver a better platform to develop more features over time, in a modular way.

We want to express our gratitude to all collaborators, contributors, GitHub sponsors and users that participated and supported us through the development stage of v3.1, you are awesome!

What's new in v3.1

As this release comes with some breaking changes, our Migration Guide is the best place to get started. Our What's new in v3.1 article also summarizes most important changes. Don't forget to check the wiki for new 3.1 related articles.

Future work

Discord4J is an evolving platform aiming to cover the needs of many bot configurations and therefore a lot of challenges come next: making sure we can expand on our Stores project with efficient and scalable caching, our Connect project for distributed Bot architectures and a range improvements are on the radar.

We also want to improve documentation and code examples on our core methods so we'll soon work on a new way to publish our documentation so collaborating with us will be made simpler.

To achieve these goals your feedback is crucial, so participating in our Discord, asking for help, sharing your projects and ideas are always welcome! Together we can turn them into new features and knowledge to help all Discord4J users.

Changelog

Closed milestones towards this release: M1, M2, RC1 and all changes from RC2, RC3 and RC4 here.

Changes in 3.0.x are in most cases forward-ported to 3.1 so they are also included: 3.0.6, 3.0.7, 3.0.8, 3.0.9, 3.0.10, 3.0.11, 3.0.12, 3.0.13, 3.0.14 and 3.0.15.

This list is not exhaustive so if you discover something missing or need help while migrating, please let us know!

🚀 Architectural changes

  • New API to build clients: DiscordClient can create GatewayDiscordClient that manages a shard group
  • A shard group now shares event dispatching and entity caching
  • DiscordClient is capable of working with the REST API independently from Gateway operations
  • Consequently, REST entities were created to interact with API objects without preemptive HTTP requests
  • Created new project to model Discord domain objects: discord-json

⚠️ Update considerations

  • Remove ShardingClientBuilder, please follow our migration guide to use the new API
  • Make DiscordClientBuilder constructor no longer publicly visible
  • Move Snowflake to common module
  • Move Permission, PermissionSet and Image to rest module
  • Change return type of Message#getContent to String
  • Change return type of ClientException#getErrorResponse (#570)
  • Change return type of GatewayClient#getResponseTime (#574)
  • Remove command module
  • Refactor Presence/Activity classes (dec1935)
  • Remove revoked Invite field (#569)
  • Move Router customization to DiscordClientBuilder (f16e386)
  • Some loggers were refactored or moved (19e39f7)
  • EventDispatcher is now an interface and can be highly customized
  • Disable debug mode by default due to performance costs. If you want improved stacktraces, see reactor-tools ReactorDebugAgent or call Hooks.onOperatorDebug()

⚠️ Behavior changes

  • DiscordClient::login now completes on a successful connection. Moving forward, the method makes most sense if it returns a handle for the underlying gateway connections
  • Specs won't be called until the sequence they belong is subscribed to (#646)

⭐️ New features and enhancements

  • Add Gateway intents support (#609, #713, #718, fc6dc23)
  • New default event dispatcher that can replay startup events to late subscribers (8999673)
  • Add event dispatcher subscription lifecycle logging (b2d5e63)
  • Add EntityRetriever abstraction for core entity fetching (#641)
  • Improve bulkDelete implementation and documentation (#745)
  • Add ReactorResources to customize Reactor threading model and other properties (with #640 enhancement)
  • New approach to rate limiting across the board (buckets, global and gateway)
  • Use reactive return types in GlobalRateLimiter (#568)
  • Permit raw RGB values in EmbedCreateSpec#setColor (#613)
  • Replace java.awt.color with custom Color class (#705, #710)
  • Add allowed mentions to control sent message pings (#673)
  • Switch to immutable objects for our data layer using discord-json project (#522)
  • Add loggers to track raw JSON payloads and HTTP messages. See Logging
  • New API to access entity caches safely
  • Add CategorizableChannel to our channel structure (ea3bdc3)
  • Improve sorting for guild channels and roles (#540)
  • New voice implementation with resume, reconnect, voice region migration capabilities (#608)
  • New VoiceConnectionRegistry to easily access active voice connections
  • Image refactor (#534)
  • Add sharding max concurrency support
  • Add support for client_status (dec1935)
  • Defer reading HTTP response body (#581)
  • Allow disabling guild subscriptions (85a5db5)
  • Allow disabling member requests (f8467fc)
  • Add RequestQueue abstraction to properly handle API requests at load (#639)
  • Add configuration for max missed heartbeat ACKs and change default from 0 to 1 (4fd54c7)
  • Add REST support to "Delete All Reactions for Emoji" (#661)
  • Add getSelfMember to Guild and RestGuild classes (#668)
  • Add MemberRequestFilter to control member loading (#663)
  • Introduce an advanced DispatchEventMapper API to customize how Events are created
  • Implement event for ReactionRemoveEmoji (#669)
  • Handle non retryable gateway errors on startup (3badddf)
  • Not printing reconnect-event as error (#674)
  • Update MemberChunkEvent fields (#675)
  • Add API to request members (lazy loading) and wait for its completion (9c93af7)
  • Add methods to externally establish voice connections, meaning only connect/disconnect payloads are sent (#677)
  • Request member from the gateway if missing from the cache (#682)
  • Add configurable timeout to VoiceChannelJoinSpec (#678)
  • Attempt to zero-copy inbound Gateway payloads
  • Add method for getting all members in a guild channel (#688)
  • Add Guild#getMaxVideoChannelUsers() (#706)
  • Update default scheduler names, they include d4j in their names (f5e5f38)
  • Replace discordapp.com with discord.com (#709)
  • Deprecate guild embed fields and add guild widget (#707)
  • Expose non-recoverable status codes through a Mono (#711 closed via a8b710d)
  • Parse self ID from token (#697)
  • REST module support for multiple query parameters under the same name
  • Add new options to guild prune actions (e4523fc)
  • Add missing dispatch mapping for MESSAGE_REACTION_REMOVE_EMOJI payload (7dfa768)
  • Add RestChannel#createMessage for content and embed only (#719)
  • Many internal improvements to Gateway and Voice Gateway implementations (2ae7419, e95e19a)
  • Add VoiceState#isSelfVideoEnabled (#722)
  • Add getGuildId and getGuild to classes missing them (#723)
  • Ensure that guild_id fields are named guildId() (#726)
  • Add VoiceChannel#isMemberConnected (#728)
  • Add disconnect cause and status to DisconnectEvent (#731)
  • Make CloseStatus#getReason return empty if reason is blank (#736)

🐞 Bug fixes

  • Fix typo with premium_subscription_count guild field (#557)
  • Stop heartbeat first when destroying the gateway client (346110e)
  • Close #650 allow ignoring channelId on member edit (37ccadf)
  • Fix #656 close codes which shouldn't retry (#657)
  • Close #658 add guild_id to VoiceStates during guild create (#664)
  • Rename delete-message-days to delete_message_days (#732)

🔨 Dependency upgrades

  • Discord4J now depends on Reactor Dysprosium
  • Reactor Core v3.3.8
  • Reactor Netty v0.9.10
  • Netty v4.1.51
  • Jackson v2.11.1
  • Discord4J/discord-json v1.5.3
  • Discord4J/Stores v3.1.3

💜 Contributors and Sponsors

Thanks again to our contributors and sponsors that made this release possible!

@Alex1304
@ByteAlex
@cbryant02
@darichey
@danthonywalker
@decyg
@Doc94
@JasonTheKitten
@kvnxiao
@Lyrth
@nikammerlaan
@NovaFox161
@quanticc
@SizableShrimp
@Shadorc
@Stupremee
@TheNumberOne
@tterrag1098
@UnderMybrella
@WinteryFox
@xaanit

Assets 2