Allow passing Emoji in components

This commit is contained in:
Rapptz committed 2021-06-02 05:30:42 -04:00
1 parent be5f4ae4ab
commit 47f2d04940
5 files changed
+43 -21

No files matched your search

+6
View File
@@ -45,6 +45,9 @@ class _EmojiTag:
id: int
def _to_partial(self) -> PartialEmoji:
raise NotImplementedError
PE = TypeVar('PE', bound='PartialEmoji')
@@ -151,6 +154,9 @@ class PartialEmoji(_EmojiTag, AssetMixin):
o['animated'] = self.animated
return o
def _to_partial(self) -> PartialEmoji:
return self
@classmethod
def with_state(
cls: Type[PE], state: ConnectionState, *, name: str, animated: bool = False, id: Optional[int] = None