mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Allow passing Emoji in components
This commit is contained in:
1 parent
be5f4ae4ab
commit
47f2d04940
5 files changed
+43
-21
No files matched your search
@@ -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