-
-
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 <[email protected]>
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 <[email protected]>
Co-authored-by: DA344 <[email protected]>
Co-authored-by: DA344 <[email protected]>
DA-344
left a comment
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.
Rapptz
left a comment
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 |
DA-344
left a comment
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 <[email protected]>
DA-344
left a comment
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 <[email protected]>
Rapptz
left a comment
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