Browse Source
chore: check types on Container.accent_colour setter
pull/10166/head
DA344
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
0 deletions
-
discord/ui/container.py
|
|
@ -247,6 +247,9 @@ class Container(Item[V]): |
|
|
|
|
|
|
|
@accent_colour.setter |
|
|
|
def accent_colour(self, value: Optional[Union[Colour, int]]) -> None: |
|
|
|
if not isinstance(value, (int, Colour)): |
|
|
|
raise TypeError(f'expected an int, or Colour, not {value.__class__.__name__!r}') |
|
|
|
|
|
|
|
self._colour = value |
|
|
|
|
|
|
|
accent_color = accent_colour |
|
|
|