diff options
| author | salmonik <raisersoft@proton.me> | 2026-02-20 19:08:00 +0100 |
|---|---|---|
| committer | salmonik <raisersoft@proton.me> | 2026-02-20 19:08:00 +0100 |
| commit | b193662b6d94cb90795366289f044b3411e03ef8 (patch) | |
| tree | c15994472f9f568b330e8fcff92038d0bd0ef64f /cogs/tts.py | |
| parent | fix settings file nagging again (diff) | |
| download | senator-sperma-b193662b6d94cb90795366289f044b3411e03ef8.tar.gz senator-sperma-b193662b6d94cb90795366289f044b3411e03ef8.zip | |
fix settings file nagging again again
Diffstat (limited to '')
| -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}") |
