fix(emojiinfo): fixed an unboundlocal error

This commit is contained in:
Seaswimmer 2024-05-08 15:38:51 -04:00
parent 4bf3e85df2
commit 2b5a00f512
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -82,9 +82,9 @@ class PartialEmoji(discord.PartialEmoji):
emojis: dict = json.load(file)
emoji_aliases = []
for dict_name, group in emojis.items():
for key, value in group.items():
if value == name:
for k, v in group.items():
if v == value:
emoji_group = dict_name
if key not in emoji_aliases:
emoji_aliases.append(key)
return cls(name=name, animated=animated, id=emoji_id, group=emoji_group, aliases=emoji_aliases)
if k not in emoji_aliases:
emoji_aliases.append(k)
return cls(name=value, animated=animated, id=emoji_id, group=emoji_group, aliases=emoji_aliases)