From 3d84dfc04ac003e37b6f406ab310a1eda36d9e87 Mon Sep 17 00:00:00 2001 From: LordOfPolls Date: Sun, 30 Oct 2022 11:43:11 +0000 Subject: [PATCH] fix: handle regional indicator emoji (#702) --- naff/models/discord/emoji.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/naff/models/discord/emoji.py b/naff/models/discord/emoji.py index 6df3b211c..4c8cd42fd 100644 --- a/naff/models/discord/emoji.py +++ b/naff/models/discord/emoji.py @@ -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: