Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

Commit

Permalink
[types.message] add Emoji.custom property
Browse files Browse the repository at this point in the history
  • Loading branch information
b1naryth1ef committed Jun 26, 2017
1 parent b3cd55e commit 8aca1b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions disco/types/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8aca1b4

Please sign in to comment.