Skip to content

Commit

Permalink
fix: Subscripted generics cannot be used with class and instance checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mantouisyummy committed Jul 22, 2024
1 parent f019663 commit c5949c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions disnake/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from . import utils
from .components import ActionRow, MessageComponent, _component_factory
from .embeds import Embed
from .emoji import AnyEmoji
from .emoji import AnyEmoji, BaseEmoji
from .enums import ChannelType, InteractionType, MessageType, try_enum, try_enum_to_int
from .errors import HTTPException
from .file import File
Expand Down Expand Up @@ -93,7 +93,7 @@ def convert_emoji_reaction(emoji: Union[EmojiInputType, Reaction]) -> str:
if isinstance(emoji, Reaction):
emoji = emoji.emoji

if isinstance(emoji, AnyEmoji):
if isinstance(emoji, BaseEmoji):
return f"{emoji.name}:{emoji.id}"
if isinstance(emoji, PartialEmoji):
return emoji._as_reaction()
Expand Down

0 comments on commit c5949c4

Please sign in to comment.