fix(emojiinfo): open the emojis.json file before attempting to read from it

This commit is contained in:
Seaswimmer 2024-05-08 15:36:17 -04:00
parent 9ed16a44f2
commit ce595e50da
Signed by untrusted user: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -77,7 +77,9 @@ class PartialEmoji(discord.PartialEmoji):
name = groups['name'] name = groups['name']
return cls(name=name, animated=animated, id=emoji_id) return cls(name=name, animated=animated, id=emoji_id)
emojis: dict = json.load(data_manager.bundled_data_path(coginstance) / "emojis.json") path: data_manager.Path = data_manager.bundled_data_path(coginstance) / "emojis.json"
with open(path, "r") as file:
emojis: dict = json.load(file)
emoji_aliases = [] emoji_aliases = []
for dict_name, group in emojis.items: for dict_name, group in emojis.items:
for key, value in group.items: for key, value in group.items: