From 2b5a00f51283f300de15152b7ce4d1619360fc98 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 8 May 2024 15:38:51 -0400 Subject: [PATCH] fix(emojiinfo): fixed an unboundlocal error --- emojiinfo/model.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/emojiinfo/model.py b/emojiinfo/model.py index 4fe1658..6660e46 100644 --- a/emojiinfo/model.py +++ b/emojiinfo/model.py @@ -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)