Browse Source

Apply suggestions from code review

Co-authored-by: DA344 <108473820+DA-344@users.noreply.github.com>
pull/10214/head
Mak 1 week ago
committed by GitHub
parent
commit
343130ffce
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      discord/guild.py
  2. 7
      discord/role.py

7
discord/guild.py

@ -3703,9 +3703,6 @@ class Guild(Hashable):
This function will now raise :exc:`TypeError` instead of This function will now raise :exc:`TypeError` instead of
``InvalidArgument``. ``InvalidArgument``.
.. versionadded:: 2.6
The ``secondary_color``, ``tertiary_color``, ``secondary_colour``, and ``tertiary_colour`` keyword-only parameters were added.
.. versionchanged:: 2.6 .. versionchanged:: 2.6
The ``colour`` and ``color`` parameters now set the role's primary color. The ``colour`` and ``color`` parameters now set the role's primary color.
@ -3721,9 +3718,13 @@ class Guild(Hashable):
This is aliased to ``color`` as well. This is aliased to ``color`` as well.
secondary_colour: Optional[Union[:class:`Colour`, :class:`int`]] secondary_colour: Optional[Union[:class:`Colour`, :class:`int`]]
The secondary colour for the role. The secondary colour for the role.
.. versionadded:: 2.6
tertiary_colour: Optional[Union[:class:`Colour`, :class:`int`]] tertiary_colour: Optional[Union[:class:`Colour`, :class:`int`]]
The tertiary colour for the role. Can only be used for the holographic role preset, The tertiary colour for the role. Can only be used for the holographic role preset,
which is ``(11127295, 16759788, 16761760)`` which is ``(11127295, 16759788, 16761760)``
.. versionadded:: 2.6
hoist: :class:`bool` hoist: :class:`bool`
Indicates if the role should be shown separately in the member list. Indicates if the role should be shown separately in the member list.
Defaults to ``False``. Defaults to ``False``.

7
discord/role.py

@ -484,9 +484,6 @@ class Role(Hashable):
This function will now raise :exc:`ValueError` instead of This function will now raise :exc:`ValueError` instead of
``InvalidArgument``. ``InvalidArgument``.
.. versionadded:: 2.6
The ``secondary_color``, ``tertiary_color``, ``secondary_colour``, and ``tertiary_colour`` keyword-only parameters were added.
.. versionchanged:: 2.6 .. versionchanged:: 2.6
The ``colour`` and ``color`` parameters now set the role's primary color. The ``colour`` and ``color`` parameters now set the role's primary color.
@ -500,9 +497,13 @@ class Role(Hashable):
The new colour to change to. (aliased to color as well) The new colour to change to. (aliased to color as well)
secondary_colour: Optional[Union[:class:`Colour`, :class:`int`]] secondary_colour: Optional[Union[:class:`Colour`, :class:`int`]]
The new secondary colour for the role. The new secondary colour for the role.
.. versionadded:: 2.6
tertiary_colour: Optional[Union[:class:`Colour`, :class:`int`]] tertiary_colour: Optional[Union[:class:`Colour`, :class:`int`]]
The new tertiary colour for the role. Can only be used for the holographic role preset, The new tertiary colour for the role. Can only be used for the holographic role preset,
which is ``(11127295, 16759788, 16761760)`` which is ``(11127295, 16759788, 16761760)``
.. versionadded:: 2.6
hoist: :class:`bool` hoist: :class:`bool`
Indicates if the role should be shown separately in the member list. Indicates if the role should be shown separately in the member list.
display_icon: Optional[Union[:class:`bytes`, :class:`str`]] display_icon: Optional[Union[:class:`bytes`, :class:`str`]]

Loading…
Cancel
Save