Browse Source
fix: Container._colour raising ValueError
pull/10166/head
DA344
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
5 deletions
-
discord/components.py
|
|
@ -1225,11 +1225,11 @@ class Container(Component): |
|
|
|
self.children.append(comp) |
|
|
|
|
|
|
|
self.spoiler: bool = data.get('spoiler', False) |
|
|
|
self._colour: Optional[Colour] |
|
|
|
try: |
|
|
|
self._colour = Colour(data['accent_color']) # type: ignore |
|
|
|
except KeyError: |
|
|
|
self._colour = None |
|
|
|
|
|
|
|
colour = data.get('accent_color') |
|
|
|
self._colour: Optional[Colour] = None |
|
|
|
if colour is not None: |
|
|
|
self._colour = Colour(colour) |
|
|
|
|
|
|
|
@property |
|
|
|
def accent_colour(self) -> Optional[Colour]: |
|
|
|