-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add user accent_color
and banner
fields
#1127
Add user accent_color
and banner
fields
#1127
Conversation
Add the new `accent_color` and `banner` fields. `accent_color` is an integer representation of the RGB color while `banner` is a hash of the user's banner image. These are mutually exclusive. This is documented in the API docs: <discord/discord-api-docs#3448> Closes #1126. Signed-off-by: Zeyla Hellyer <zeyla@hellyer.dev>
If these are mutually exclusive, is it too far out for Twilight to make an enum represententing them as such instead of two options, which technically could allow for illegal states? |
Signed-off-by: Zeyla Hellyer <zeyla@hellyer.dev>
4b84280
I was wrong and they aren't exclusive: {
"id": "640434332485287936",
"username": "zeyla",
"avatar": "a262fa99ab1d42f16751c67886da5640",
"discriminator": "4443",
"public_flags": 0,
"banner": "ce98ed5651d0add1e3ff98782095a7dd",
"banner_color": "#17191c",
"accent_color": 1513756
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we model the difference between null and the value being omitted here? Or is the difference irrelevant in all cases?
Additions Add `Command::kind`, which is a `CommandType`, in order to support Message and User application commands ([#1107] - [@7596ff]). Add `CommandInteractionDataResolved::messages`, which is a list of messages relevant to the interaction ([#1107] - [@7596ff]). Add `MessageType::ContextMenuCommand`, which is relevant to Message and User commands ([#1107] - [@7596ff]). Add the `{Current, User}::{accent_color, banner}` fields ([#1127] - [@zeylahellyer]). Fixes `Command` deserialization no longer errors if the `options` field was missing ([#1112] - [@Erk-]). [#1107]: #1107 [@7596ff]: https://github.com/7596ff [@zeylahellyer]: https://github.com/zeylahellyer
Add the new `accent_color` and `banner` fields. `accent_color` is an integer representation of the RGB color while `banner` is a hash of the user's banner image. This is documented in the API docs: <discord/discord-api-docs#3448> Closes twilight-rs#1126.
Additions Add `Command::kind`, which is a `CommandType`, in order to support Message and User application commands ([twilight-rs#1107] - [@7596ff]). Add `CommandInteractionDataResolved::messages`, which is a list of messages relevant to the interaction ([twilight-rs#1107] - [@7596ff]). Add `MessageType::ContextMenuCommand`, which is relevant to Message and User commands ([twilight-rs#1107] - [@7596ff]). Add the `{Current, User}::{accent_color, banner}` fields ([twilight-rs#1127] - [@zeylahellyer]). Fixes `Command` deserialization no longer errors if the `options` field was missing ([twilight-rs#1112] - [@Erk-]). [twilight-rs#1107]: twilight-rs#1107 [@7596ff]: https://github.com/7596ff [@zeylahellyer]: https://github.com/zeylahellyer
Add the new
accent_color
andbanner
fields.accent_color
is an integer representation of the RGB color whilebanner
is a hash of the user's banner image. These are mutually exclusive.This is documented in the API docs: discord/discord-api-docs#3448
Closes #1126.