From 2f77c36dfd41e1424066987ae209627376b0444a Mon Sep 17 00:00:00 2001 From: Kodie Date: Fri, 27 Oct 2017 16:49:24 -0700 Subject: [PATCH] Typecase id value to bool in the case where id is Unset this will call the builtin __bool__ which returns False. This is not ideal beacuse an Id of 0 will mean the emoji is custom, but to fix would require a deeper refactor of the Field logic. Lets put a pin in it. --- disco/types/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disco/types/message.py b/disco/types/message.py index efd9916..fe357f1 100644 --- a/disco/types/message.py +++ b/disco/types/message.py @@ -43,7 +43,7 @@ class Emoji(SlottedModel): @cached_property def custom(self): - return not isinstance(self.id, Unset) + return bool(self.id) def __eq__(self, other): if isinstance(other, Emoji):