Skip to content

Commit 9116f68

Browse files
committed
fix: Remove redundant validation checks for shared_client_theme
1 parent 236e8ec commit 9116f68

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

discord/abc.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,24 +1608,6 @@ async def send(
16081608
content = str(content) if content is not None else None
16091609

16101610
if shared_client_theme is not None:
1611-
if shared_client_theme.colors is None or len(shared_client_theme.colors) == 0:
1612-
raise InvalidArgument("shared_client_theme must have at least one color")
1613-
if len(shared_client_theme.colors) > 5:
1614-
raise InvalidArgument("shared_client_theme cannot have more than 5 colors")
1615-
1616-
if shared_client_theme.gradient_angle is None :
1617-
raise InvalidArgument("shared_client_theme must have a gradient angle")
1618-
if shared_client_theme.gradient_angle < 0 or shared_client_theme.gradient_angle > 360:
1619-
raise InvalidArgument("shared_client_theme gradient angle must be between 0 and 360 degrees")
1620-
1621-
if shared_client_theme.base_mix is None :
1622-
raise InvalidArgument("shared_client_theme must have a base mix value")
1623-
if shared_client_theme.base_mix < 0 or shared_client_theme.base_mix > 100 :
1624-
raise InvalidArgument("shared_client_theme base mix must be between 0 and 100")
1625-
1626-
if shared_client_theme.base_theme is not None and not isinstance(shared_client_theme.base_theme, SharedClientThemeBaseType):
1627-
raise InvalidArgument("shared_client_theme base theme must be a SharedClientThemeBaseType enum value")
1628-
16291611
shared_client_theme = shared_client_theme.to_dict()
16301612

16311613
if embed is not None and embeds is not None:

0 commit comments

Comments
 (0)