Emoji Model¶
Note
The following classes come from the scurrypy.models.emoji module.
EmojiModel
dataclass
¶
Bases: DataModel
Represents a Discord emoji.
name: str
instance-attribute
¶
Name of emoji.
id: int = 0
class-attribute
instance-attribute
¶
ID of the emoji (if custom).
animated: bool = False
class-attribute
instance-attribute
¶
If the emoji is animated. Defaults to False.
mention: str
property
¶
For use in message content.
api_code: str
property
¶
Return the correct API code for this emoji (URL-safe).
url: str
property
¶
Return the full qualifying link for this emoji.
Important
This only works for custom Discord emojis (those with an ID).
Unicode emojis will return None.
to_dict
¶
Recursively turns the dataclass into a dictionary and drops empty fields.
Returns:
-
dict–serialized dataclasss