diff options
Diffstat (limited to 'cogs/tts.py')
| -rw-r--r-- | cogs/tts.py | 3 |
1 files changed, 2 insertions, 1 deletions
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}") |
