From d187fff90b1131385a94e14eeba5b146271587c1 Mon Sep 17 00:00:00 2001 From: Zomatree Date: Fri, 15 Jul 2022 23:37:26 +0100 Subject: [PATCH] add masquerade colour --- revolt/message.py | 6 ++++++ revolt/types/message.py | 1 + 2 files changed, 7 insertions(+) diff --git a/revolt/message.py b/revolt/message.py index de5baec..b14fe81 100755 --- a/revolt/message.py +++ b/revolt/message.py @@ -160,9 +160,12 @@ class Masquerade(NamedTuple): The name to display for the message avatar: Optional[:class:`str`] The avatar's url to display for the message + colour: Optional[:class:`str`] + The colour of the name, similar to role colours """ name: Optional[str] = None avatar: Optional[str] = None + colour: Optional[str] = None def to_dict(self) -> MasqueradePayload: output: MasqueradePayload = {} @@ -173,4 +176,7 @@ def to_dict(self) -> MasqueradePayload: if avatar := self.avatar: output["avatar"] = avatar + if colour := self.colour: + output["colour"] = colour + return output diff --git a/revolt/types/message.py b/revolt/types/message.py index 1b29d00..6385a1d 100755 --- a/revolt/types/message.py +++ b/revolt/types/message.py @@ -51,6 +51,7 @@ class ChannelIconChangeContent(TypedDict): class Masquerade(TypedDict, total=False): name: str avatar: str + colour: str class Message(TypedDict): _id: str