79432188

Date: 2025-02-12 06:57:17
Score: 1
Natty:
Report link

Okay, I've tried a bit more and got success.
Both user_data and config files lies in %project_name% folder, where main bot.py file is.
I changed user_data path to simple "DATA_FILE: "user_data.json", and edited the code to:

CONFIG_FILE = "config.json"   # <- changed here

def load_config():
  if not CONFIG_FILE:         # <- and here
    return {}
  with open(CONFIG_FILE, 'r', encoding='utf-8') as file:
    return json.load(file)
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Plem