What's new in v3.3
Maintenance mode for v3.2
After v3.3.0 is released, only bugfixes will be accepted in the 3.2.x branch.
Features
Support for new Channel Types
We now support more new channel types like:
- Stage channels
- Threads
- Forums
API changes
Notable changes
- Update gateway API version to 10
- Calling any method that retrieves restricted data (message content, embeds, etc.) without enabling the
MESSAGE_CONTENTwill raise anUnsupportedOperationException - Created a new interface,
TopLevelGuildMessageWithThreadsChannelthat extendsTopLevelGuildMessageChannel, used forTextChannelandNewsChannel. This interface represents text channels that can have threads (AVoiceChannelis also aTopLevelGuildMessageChannelbut cannot have threads).
Signature changes
-
RestGuild#modifyChannelPositionsnow takes aList<ChannelPositionModifyRequest>as parameter -
RestGuild#modifyRolePositionsnow takes aList<RolePositionModifyRequest>as parameter -
GuildService#modifyGuildChannelPositionsnow takes aChannelPositionModifyRequest[]as parameter -
GuildService#modifyGuildRolePositionsnow takes aRolePositionModifyRequest[]as parameter -
MessageCreateSpec#messageReferencenow takes aPossible<MessageReferenceData>as parameter -
MessageCreateMono#withMessageReferencenow takes aPossible<MessageReferenceData>as parameter -
ApplicationTeamMember#getRoleno longer returnsnullfor the team owner, butTeamMemberRole.ADMIN -
ApplicationInfo#getOwnerIdnow returns anOptional<Snowflake> -
RestGuild#modifyChannelPositionsnow returns aFlux<Void> -
GuildService#modifyGuildChannelPositionsnow returns aFlux<Void> -
MessageBulkDeleteEvent#getChannelnow returns aMono<MessageChannel> -
VoiceState#getChannelnow returns aMono<AudioChannel> -
ResolvedChannel#getNamenow returns anOptional<String> -
ResolvedChannel#getEffectivePermissionsnow returns anOptional<PermissionSet> -
MessageChannel#getPinnedMessagesnow returns aPinnedMessagesQueryFluxwith a reference pinned message -
The
GuildEmojiclass now extendsEmoji -
The
Categoryclass now extendsBaseTopLevelGuildChannel -
The
GuildMessageChannelclass now extendsGuildChannel, MessageChannel -
The
PrivateChannelclass now extendsBaseChanneland implementsMessageChannel -
The
StoreChannelclass now extendsBaseTopLevelGuildChanneland implementsCategorizableChannel -
The
NewsChannelclass now extendsBaseTopLevelGuildChanneland implementsTopLevelGuildMessageWithThreadsChannel -
The
TextChannelclass now extendsBaseTopLevelGuildChanneland implementsTopLevelGuildMessageWithThreadsChannel -
The
VoiceChannelclass now extendsBaseTopLevelGuildChanneland implementsAudioChannel, TopLevelGuildMessageChannel -
The method
User#equalsis no longer final -
Renamed method
Guild#getGuildEmojiByIdtogetEmojiById -
Renamed
VoiceChannelJoinSpectoAudioChannelJoinSpec -
Renamed
VoiceChannelJoinMonotoAudioChannelJoinMono -
Renamed
ReactionEmojitoEmoji -
Removed field
Routes#NITRO_STICKER_PACKS_GET; useRoutes#STICKER_PACK_GET.
Removed methods and classes
- Removed method
AutoModRule#edit(String name, EventType eventType, boolean enabled) - Removed method
ClientException#isRetryContextStatusCode - Removed deprecated method
Message#suppressEmbeds - Removed deprecated method
RestGuild#modifyOwnNickname - Removed deprecated method
ChannelService#suppressEmbeds - Removed
com.iwebpp.cryptoclasses - Removed class
BaseCategorizableChannel - Removed class
BaseGuildChannel - Removed class
BaseGuildMessageChannel - Removed class
BaseMessageChannel - Removed class
BaseTopLevelGuildMessageChannel - Removed deprecated field
Routes#MESSAGE_SUPPRESS_EMBEDS - Removed deprecated field
Routes#NICKNAME_MODIFY_OWN
Deprecations
- Deprecated method
IntegrationApplication#getSummary - Deprecated method
Guild#getFeatures(useGuild#getGuildFeatures) - Deprecated method
ApplicationInfo#isPublic(useApplicationInfo#isBotPublic) - Deprecated method
ApplicationInfo#requireCodeGrant(useApplicationInfo#botRequiresCodeGrant) - Deprecated method
ResolvedMember#getNicknameMention(This type of ping has been deprecated in the Discord API)
Other changes
- Using an
AutoModRuleEditMonoorAutoModRuleEditSpecno longer requires all fields to be set - Remove Reactor dependency as it is unused in this repo, replaced
reactor.util.annotation.*withjavax.annotation.*from jsr305 - Move classes in the encoding module to their own package (
discord4j.discordjson.encoding) due to package name clashing with api module (issue when linking both modules in a project declaring a module-info.java)
Behavior changes
Components Flag
For messages with components, the components flag is now set to true by default if you add any component from v2 to the message.
New channel hierarchy
With #960, the channel structure was changed to match more closely how Discord organizes the channels.