Skip to content
This repository was archived by the owner on Dec 18, 2021. It is now read-only.

Commit 31b8798

Browse files
committed
fix: custom emoji not showing
1 parent e57d357 commit 31b8798

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

discord_components/button.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from discord import InvalidArgument, PartialEmoji
1+
from discord import InvalidArgument, PartialEmoji, Emoji
22

33
from typing import Union, Optional
44
from uuid import uuid1
@@ -93,7 +93,9 @@ def __init__(
9393
self._url = url
9494
self._disabled = disabled
9595

96-
if isinstance(emoji, PartialEmoji):
96+
if isinstance(emoji, Emoji):
97+
self._emoji = PartialEmoji(name=emoji.name, animated=emoji.animated, id=emoji.id)
98+
elif isinstance(emoji, PartialEmoji):
9799
self._emoji = emoji
98100
elif isinstance(emoji, str):
99101
self._emoji = PartialEmoji(name=emoji)

0 commit comments

Comments
 (0)