|
@ -3648,8 +3648,8 @@ class Guild(Hashable): |
|
|
hoist: bool = ..., |
|
|
hoist: bool = ..., |
|
|
display_icon: Union[bytes, str] = MISSING, |
|
|
display_icon: Union[bytes, str] = MISSING, |
|
|
mentionable: bool = ..., |
|
|
mentionable: bool = ..., |
|
|
secondary_colour: Union[Colour, int, None] = ..., |
|
|
secondary_colour: Optional[Union[Colour, int]] = ..., |
|
|
tertiary_colour: Union[Colour, int, None] = ..., |
|
|
tertiary_colour: Optional[Union[Colour, int]] = ..., |
|
|
) -> Role: |
|
|
) -> Role: |
|
|
... |
|
|
... |
|
|
|
|
|
|
|
@ -3664,8 +3664,8 @@ class Guild(Hashable): |
|
|
hoist: bool = ..., |
|
|
hoist: bool = ..., |
|
|
display_icon: Union[bytes, str] = MISSING, |
|
|
display_icon: Union[bytes, str] = MISSING, |
|
|
mentionable: bool = ..., |
|
|
mentionable: bool = ..., |
|
|
secondary_color: Union[Colour, int, None] = ..., |
|
|
secondary_color: Optional[Union[Colour, int]] = ..., |
|
|
tertiary_color: Union[Colour, int, None] = ..., |
|
|
tertiary_color: Optional[Union[Colour, int]] = ..., |
|
|
) -> Role: |
|
|
) -> Role: |
|
|
... |
|
|
... |
|
|
|
|
|
|
|
@ -3680,10 +3680,10 @@ class Guild(Hashable): |
|
|
display_icon: Union[bytes, str] = MISSING, |
|
|
display_icon: Union[bytes, str] = MISSING, |
|
|
mentionable: bool = MISSING, |
|
|
mentionable: bool = MISSING, |
|
|
reason: Optional[str] = None, |
|
|
reason: Optional[str] = None, |
|
|
secondary_color: Union[Colour, int, None] = MISSING, |
|
|
secondary_color: Optional[Union[Colour, int]] = MISSING, |
|
|
tertiary_color: Union[Colour, int, None] = MISSING, |
|
|
tertiary_color: Optional[Union[Colour, int]] = MISSING, |
|
|
secondary_colour: Union[Colour, int, None] = MISSING, |
|
|
secondary_colour: Optional[Union[Colour, int]] = MISSING, |
|
|
tertiary_colour: Union[Colour, int, None] = MISSING, |
|
|
tertiary_colour: Optional[Union[Colour, int]] = MISSING, |
|
|
) -> Role: |
|
|
) -> Role: |
|
|
"""|coro| |
|
|
"""|coro| |
|
|
|
|
|
|
|
@ -3712,9 +3712,9 @@ class Guild(Hashable): |
|
|
colour: Union[:class:`Colour`, :class:`int`] |
|
|
colour: Union[:class:`Colour`, :class:`int`] |
|
|
The colour for the role. Defaults to :meth:`Colour.default`. |
|
|
The colour for the role. Defaults to :meth:`Colour.default`. |
|
|
This is aliased to ``color`` as well. |
|
|
This is aliased to ``color`` as well. |
|
|
secondary_colour: Union[:class:`Colour`, :class:`int`, None] |
|
|
secondary_colour: Optional[Union[:class:`Colour`, :class:`int`]] |
|
|
The secondary colour for the role. |
|
|
The secondary colour for the role. |
|
|
tertiary_colour: Union[:class:`Colour`, :class:`int`, None] |
|
|
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)`` |
|
|
hoist: :class:`bool` |
|
|
hoist: :class:`bool` |
|
@ -3757,20 +3757,25 @@ class Guild(Hashable): |
|
|
else: |
|
|
else: |
|
|
fields['color'] = actual_colour.value |
|
|
fields['color'] = actual_colour.value |
|
|
|
|
|
|
|
|
actual_secondary_colour = secondary_colour or secondary_color or Colour.default() |
|
|
actual_secondary_colour = secondary_colour or secondary_color |
|
|
actual_tertiary_colour = tertiary_colour or tertiary_color |
|
|
actual_tertiary_colour = tertiary_colour or tertiary_color |
|
|
colours = { |
|
|
|
|
|
|
|
|
colours: Dict[str, Any] = { |
|
|
'primary_color': fields['color'], |
|
|
'primary_color': fields['color'], |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if actual_secondary_colour is not MISSING: |
|
|
if actual_secondary_colour is not MISSING: |
|
|
if isinstance(actual_secondary_colour, int): |
|
|
if actual_secondary_colour is None: |
|
|
|
|
|
colours['secondary_color'] = None |
|
|
|
|
|
elif isinstance(actual_secondary_colour, int): |
|
|
colours['secondary_color'] = actual_secondary_colour |
|
|
colours['secondary_color'] = actual_secondary_colour |
|
|
else: |
|
|
else: |
|
|
colours['secondary_color'] = actual_secondary_colour.value |
|
|
colours['secondary_color'] = actual_secondary_colour.value |
|
|
|
|
|
|
|
|
if actual_tertiary_colour is not MISSING and actual_tertiary_colour is not None: |
|
|
if actual_tertiary_colour is not MISSING: |
|
|
if isinstance(actual_tertiary_colour, int): |
|
|
if actual_tertiary_colour is None: |
|
|
|
|
|
colours['tertiary_color'] = None |
|
|
|
|
|
elif isinstance(actual_tertiary_colour, int): |
|
|
colours['tertiary_color'] = actual_tertiary_colour |
|
|
colours['tertiary_color'] = actual_tertiary_colour |
|
|
else: |
|
|
else: |
|
|
colours['tertiary_color'] = actual_tertiary_colour.value |
|
|
colours['tertiary_color'] = actual_tertiary_colour.value |
|
|