Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
fix: handle regional indicator emoji (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
LordOfPolls authored Oct 30, 2022
1 parent 77cb2b2 commit 3d84dfc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions naff/models/discord/emoji.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ def from_str(cls, emoji_str: str, *, language: str = "alias") -> Optional["Parti
_emoji_list = emoji.distinct_emoji_list(emoji_str)
if _emoji_list:
return cls(name=_emoji_list[0])
if len(emoji_str) == 1:
# likely a regional indicator
return cls(name=emoji_str)
return None

def __str__(self) -> str:
Expand Down

0 comments on commit 3d84dfc

Please sign in to comment.