Skip to content

Add support for enhanced role colors#2975

Merged
MinnDevelopment merged 4 commits intomasterfrom
feature/role-colors
Dec 12, 2025
Merged

Add support for enhanced role colors#2975
MinnDevelopment merged 4 commits intomasterfrom
feature/role-colors

Conversation

@MinnDevelopment
Copy link
Copy Markdown
Member

Pull Request Etiquette

  • I have checked the PRs for upcoming features/bug fixes.
  • I have read the contributing guidelines.
  • I applied the code formatter to my changes with ./gradlew format

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: NaN

Description

This adds support for enhanced role colors (boost feature).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for enhanced role colors, a Discord boost feature that allows roles to have gradient and holographic color styles in addition to single solid colors.

Key Changes

  • Introduces RoleColors entity class to represent up to three color components (primary, secondary, tertiary) for roles
  • Adds new methods setGradientColors() and useHolographicStyle() to RoleAction and RoleManager for configuring enhanced colors
  • Deprecates existing single-color methods (getColor(), getColorRaw()) in favor of the new getColors() API

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
RoleColors.java New entity class representing role color components with support for solid, gradient, and holographic styles
RoleActionImpl.java Updated to use RoleColors instead of single integer color value
RoleManagerImpl.java Updated color management to support RoleColors
RoleImpl.java Stores three color components (primary, secondary, tertiary) instead of single color
DetachedRoleImpl.java Mirrors RoleImpl changes for detached entities
MemberImpl.java Removed deprecated color methods now implemented in MemberMixin
DetachedMemberImpl.java Removed deprecated color methods now implemented in MemberMixin
MemberMixin.java Implements getColors() to return colors from highest non-default role
GuildRoleUpdateHandler.java Handles color update events and maintains backward compatibility with deprecated RoleUpdateColorEvent
RoleUpdateColorsEvent.java New event for role color updates
RoleUpdateColorEvent.java Deprecated in favor of RoleUpdateColorsEvent
Role.java Adds getColors() and deprecates getColor()/getColorRaw()
Member.java Adds getColors() and deprecates getColor()/getColorRaw()
RoleAction.java Adds setColors(), setGradientColors(), and useHolographicStyle() methods
RoleManager.java Adds setColors(), setGradientColors(), and useHolographicStyle() methods
AbstractEntityBuilder.java Adds createRoleColors() helper to deserialize color data from JSON
ListenerAdapter.java Adds onRoleUpdateColors() and deprecates onRoleUpdateColor()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/net/dv8tion/jda/internal/entities/RoleImpl.java Outdated
Comment thread src/main/java/net/dv8tion/jda/api/entities/RoleColors.java Outdated
Comment thread src/main/java/net/dv8tion/jda/api/entities/Member.java Outdated
Comment thread src/main/java/net/dv8tion/jda/api/requests/restaction/RoleAction.java Outdated
Comment thread src/main/java/net/dv8tion/jda/api/requests/restaction/RoleAction.java Outdated
Comment thread src/main/java/net/dv8tion/jda/api/managers/RoleManager.java Outdated
Comment thread src/main/java/net/dv8tion/jda/internal/entities/RoleImpl.java Outdated
@MinnDevelopment MinnDevelopment added this pull request to the merge queue Dec 12, 2025
Merged via the queue into master with commit 2f1de00 Dec 12, 2025
1 check passed
@MinnDevelopment MinnDevelopment deleted the feature/role-colors branch December 12, 2025 17:37
MrPowerGamerBR pushed a commit to LorittaBot/DeviousJDA that referenced this pull request Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants