diff options
| author | Austin Hellyer <[email protected]> | 2016-11-14 22:06:54 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-11-14 22:06:54 -0800 |
| commit | 83e57f9191c44104addc56537a5fb534b0c4382f (patch) | |
| tree | f845841ae811c75486a04425bb31ccbaf2632183 /src/utils/builder | |
| parent | Allow current user to nickname themselves (diff) | |
| download | serenity-83e57f9191c44104addc56537a5fb534b0c4382f.tar.xz serenity-83e57f9191c44104addc56537a5fb534b0c4382f.zip | |
Decode embed/role colours into Colour struct
This is for a little bit of ergonomics, and is of such a minute cost
that it is worth it to just directly decode the u32's received for
Role/Embed colours into the Colour struct.
Diffstat (limited to 'src/utils/builder')
| -rw-r--r-- | src/utils/builder/edit_role.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/builder/edit_role.rs b/src/utils/builder/edit_role.rs index f4fa7ef..d1e2c0e 100644 --- a/src/utils/builder/edit_role.rs +++ b/src/utils/builder/edit_role.rs @@ -37,7 +37,7 @@ impl EditRole { /// Creates a new builder with the values of the given [`Role`]. pub fn new(role: &Role) -> Self { EditRole(ObjectBuilder::new() - .insert("color", role.colour) + .insert("color", role.colour.value) .insert("hoist", role.hoist) .insert("managed", role.managed) .insert("mentionable", role.mentionable) |