From ccc33717c87f05ac7b434c50d945965a48838f95 Mon Sep 17 00:00:00 2001 From: Soheab_ <33902984+Soheab@users.noreply.github.com> Date: Mon, 20 Apr 2026 18:48:25 +0200 Subject: [PATCH] Versionadded and readability Co-Authored-By: Sacul <183588943+sacul0457@users.noreply.github.com> --- discord/message.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/discord/message.py b/discord/message.py index 4fc595483..a3ffac1ee 100644 --- a/discord/message.py +++ b/discord/message.py @@ -1041,7 +1041,7 @@ class SharedClientTheme: if len(value) > 5: raise ValueError('cannot have more than 5 colours') - if len(value) <= 1: + if len(value) < 2: self.intensity = 0 self._colours = value @@ -1056,7 +1056,7 @@ class SharedClientTheme: @gradient_angle.setter def gradient_angle(self, value: int) -> None: - if len(self.colours) <= 1 and value != 0: + if len(self.colours) < 2 and value != 0: raise ValueError('gradient_angle may only be set if there are at least 2 colours') if not 0 <= value <= 360: @@ -2281,7 +2281,7 @@ class Message(PartialMessage, Hashable): shared_client_theme: Optional[:class:`SharedClientTheme`] The client theme shared in this message. - .. versionadded:: 2.5 + .. versionadded:: 2.8 """ __slots__ = (