mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 01:46:08 +00:00
Allow passing Emoji in components
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user