From 8aca1b47b7acf5d252122740577aa5d4398c5a7c Mon Sep 17 00:00:00 2001 From: andrei Date: Mon, 26 Jun 2017 11:35:05 -0700 Subject: [PATCH] [types.message] add Emoji.custom property --- disco/types/message.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/disco/types/message.py b/disco/types/message.py index 3077b32..219dbc8 100644 --- a/disco/types/message.py +++ b/disco/types/message.py @@ -31,6 +31,10 @@ class Emoji(SlottedModel): id = Field(snowflake) name = Field(text) + @cached_property + def custom(self): + return self.id is not None + def __eq__(self, other): if isinstance(other, Emoji): return self.id == other.id and self.name == other.name