From b193662b6d94cb90795366289f044b3411e03ef8 Mon Sep 17 00:00:00 2001 From: salmonik Date: Fri, 20 Feb 2026 19:08:00 +0100 Subject: fix settings file nagging again again --- cogs/music/search_utils.py | 3 ++- cogs/tts.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'cogs') diff --git a/cogs/music/search_utils.py b/cogs/music/search_utils.py index 50d229c..bc9e335 100644 --- a/cogs/music/search_utils.py +++ b/cogs/music/search_utils.py @@ -242,7 +242,8 @@ class AudioSearcher: try: async with aiofiles.open('settings.json') as f: - data = json.load(f) + content = await f.read() + data = json.loads(content) search_paths = data.get('audio_paths', []) logger.info(f"Searching in paths: {search_paths}") diff --git a/cogs/tts.py b/cogs/tts.py index 158006c..44a976f 100644 --- a/cogs/tts.py +++ b/cogs/tts.py @@ -24,7 +24,8 @@ class TTS(commands.Cog): if os.path.exists('settings.json'): try: async with aiofiles.open('settings.json') as f: - data = json.load(f) + content = await f.read() + data = json.loads(content) volume = data.get('volume', 1.0) except (json.JSONDecodeError, KeyError) as e: logger.error(f"Error loading settings: {e}") -- cgit v1.2.3