discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

accentColor showing null for automatically assigned accent colors

Open MaxEnough opened this issue 4 months ago • 4 comments

Description

accentColor will show null after being fetched if the user has not explicitly set a banner color on their profile or set a banner.

Steps to Reproduce

  1. Fetch a user who hasn't explicitly set a banner color or banner image

Expected Behavior

accentColor should return the color that Discord has automatically assigned

Current Behavior

accentColor returning null

Screenshots/Videos

Top user has explicitly set banner color, bottom hasn't:

image

Client and System Information

Tested with discord.js and discord.py, appears to be an issue on all clients

MaxEnough avatar Feb 23 '24 06:02 MaxEnough

if the user hasn't set an accent color, the color is computed client-side using the avatar image data

advaith1 avatar Feb 23 '24 06:02 advaith1

if the user hasn't set an accent color, the color is computed client-side using the avatar image data

It should still be placed in the user object. The automatically generated color is still shown in settings making it no different than a manually set color.

image

MaxEnough avatar Feb 23 '24 06:02 MaxEnough

@appellation I would argue this is a more of a bug than a feature request, since the color shows correctly in the User object when banner color is manually set in profile settings

MaxEnough avatar Feb 27 '24 19:02 MaxEnough

As @advaith1 mentioned, it's intended behavior that null indicates the computed value.

appellation avatar Feb 27 '24 19:02 appellation