aboutsummaryrefslogtreecommitdiffstats
path: root/cogs
diff options
context:
space:
mode:
Diffstat (limited to 'cogs')
-rw-r--r--cogs/music/search_utils.py3
-rw-r--r--cogs/tts.py3
2 files changed, 4 insertions, 2 deletions
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:
242 242
243 try: 243 try:
244 async with aiofiles.open('settings.json') as f: 244 async with aiofiles.open('settings.json') as f:
245 data = json.load(f) 245 content = await f.read()
246 data = json.loads(content)
246 search_paths = data.get('audio_paths', []) 247 search_paths = data.get('audio_paths', [])
247 logger.info(f"Searching in paths: {search_paths}") 248 logger.info(f"Searching in paths: {search_paths}")
248 249
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):
24 if os.path.exists('settings.json'): 24 if os.path.exists('settings.json'):
25 try: 25 try:
26 async with aiofiles.open('settings.json') as f: 26 async with aiofiles.open('settings.json') as f:
27 data = json.load(f) 27 content = await f.read()
28 data = json.loads(content)
28 volume = data.get('volume', 1.0) 29 volume = data.get('volume', 1.0)
29 except (json.JSONDecodeError, KeyError) as e: 30 except (json.JSONDecodeError, KeyError) as e:
30 logger.error(f"Error loading settings: {e}") 31 logger.error(f"Error loading settings: {e}")