-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add role parameters to support new gradient and holographic roles #10214
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
Conversation
Maybe relevant : https://discord.com/channels/336642139381301249/1385146482465837066 |
Co-authored-by: dolfies <jeyalfie47@gmail.com>
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.
Please, update the corresponding types/
object, and make sure you follow the documentation (pr): discord/discord-api-docs#7549 : only time when colors
is not required is when creating a role, but it is still recommended to be passed
Co-authored-by: DA344 <108473820+DA-344@users.noreply.github.com>
Co-authored-by: DA344 <108473820+DA-344@users.noreply.github.com>
Co-authored-by: DA344 <108473820+DA-344@users.noreply.github.com>
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.
Again, please refer to the discord api docs PR I referred on my last review, these are incorrect.
discord/role.py
Outdated
colours = { | ||
'primary_color': payload['color'], | ||
} |
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.
Maybe we should change this to not pass the color
key on the payload at all, because it is not recommended anymore, use the colors
field everytime, even if not using a gradient/holographic colour.
discord/guild.py
Outdated
else: | ||
fields['color'] = actual_colour.value |
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.
This and the lines above should just be on colors.primary_color
, not on color
anymore.
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.
This looks fine, just needs the appropriate .. versionadded:: 2.6
strings.
Apparently Role.color is now deprecated so you need to get it from |
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.
LGTM as long as these are fixed!
Co-authored-by: DA344 <108473820+DA-344@users.noreply.github.com>
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.
LGTM
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
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.
LGTM. Thanks.
Summary
Add new role parameters primary_color, secondary_color and tertiary_color to support new gradient and holographic roles
Checklist