check that directory exists
This commit is contained in:
parent
ff5ac25392
commit
658cff47c9
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue