Browse Source
update container.accent_colour to not raise errors on None
Co-authored-by: Jay3332 <40323796+jay3332@users.noreply.github.com>
pull/10166/head
DA344
3 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
discord/ui/container.py
|
|
@ -234,7 +234,7 @@ class Container(Item[V]): |
|
|
|
|
|
|
|
@accent_colour.setter |
|
|
|
def accent_colour(self, value: Optional[Union[Colour, int]]) -> None: |
|
|
|
if not isinstance(value, (int, Colour)): |
|
|
|
if value is not None and not isinstance(value, (int, Colour)): |
|
|
|
raise TypeError(f'expected an int, or Colour, not {value.__class__.__name__!r}') |
|
|
|
|
|
|
|
self._colour = value |
|
|
|