From ce595e50da1dd5ca5f43aa435fb47e689980e281 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 8 May 2024 15:36:17 -0400 Subject: [PATCH] fix(emojiinfo): open the emojis.json file before attempting to read from it --- emojiinfo/model.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emojiinfo/model.py b/emojiinfo/model.py index 80b8504..7f43a4b 100644 --- a/emojiinfo/model.py +++ b/emojiinfo/model.py @@ -77,7 +77,9 @@ class PartialEmoji(discord.PartialEmoji): name = groups['name'] 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 = [] for dict_name, group in emojis.items: for key, value in group.items: