From 658cff47c9e58578a198abcbdc980de14ccbbb0c Mon Sep 17 00:00:00 2001 From: phixxy Date: Tue, 5 Nov 2024 17:44:18 -0800 Subject: [PATCH] check that directory exists --- cogs/message_xp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/message_xp.py b/cogs/message_xp.py index 7291fb8..74b5fa8 100644 --- a/cogs/message_xp.py +++ b/cogs/message_xp.py @@ -53,7 +53,7 @@ class MessageXP(BotBaseCog): def create_xp_file(self): os.makedirs(self.data_dir, exist_ok=True) # Ensure the directory exists - xp_data = {} # Populate this with the required data + xp_data = {} try: with open(os.path.join(self.data_dir, "xp.json"), "w") as xp_file: json.dump(xp_data, xp_file)