Add EmojiInfo cog #27

Merged
cswimr merged 27 commits from emoji into main 2024-05-08 16:07:30 -04:00
Showing only changes of commit 2b5a00f512 - Show all commits

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)