Allow passing Emoji in components

This commit is contained in:
Rapptz
2021-06-02 05:28:07 -04:00
parent be5f4ae4ab
commit 47f2d04940
5 changed files with 43 additions and 21 deletions

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