discord-api-docs
discord-api-docs copied to clipboard
`banner` and `accent_color` are always `null` on a message author via REST
Description
banner and accent_color are returned for the message author when fetching a message. These properties always seem to be null.
Steps to Reproduce
- Find a message whose author has either a profile banner or a profile theme set
- Run the following replacing
channel_idwith a channel id andmessage_idwith a message id:curl 'https://discord.com/api/v10/channels/channel_id/messages/message_id' \ --request GET \ --header 'Authorization: Bot <token>'
Expected Behavior
The fields should be populated correctly. Perhaps they should even be omitted per https://github.com/discord/discord-api-docs/issues/3898#issuecomment-947900146.
Current Behavior
Both fields are always null.
Screenshots/Videos
No response
Client and System Information
curl 8.4.0 (x86_64-apple-darwin23.0) libcurl/8.4.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.58.0
The fields will not be present when null in the next API deploy
Actually it turned out changing this was more trouble than I thought. Its not really a bug though, so Im just gonna leave it as-is
Its not really a bug though, so Im just gonna leave it as-is
For clarity, are you saying that when a user has a banner and Discord says they do not, that is intended behaviour?
Its intended behavior that this API does not return the banner information
incorrect null responses cause issues for libraries since their user processing would see that the field is null and then update the cached user object to change the field to null, assuming that the user's banner has been removed
Is this affecting anyone in practice? IMO API requests shouldn't be updating stateful models, that's what the gateway events are for
API requests should have the most up to date state as much as possible, so it just makes sense to have this properly populated.
Is this affecting anyone in practice? IMO API requests shouldn't be updating stateful models, that's what the gateway events are for
This would be a reasonable way to go about this. If there actually was any gateway event that had the banner and accentColor properties this is about. But there isn’t. So API requests are the only way to update the state of them. If you instead implement a gateway event to send these on change I‘d be very happy to not change the data based on the API requests.
Alright thanks for convincing me
Any updates on this?