diff options
Diffstat (limited to 'cogs/vclogs.py')
| -rw-r--r-- | cogs/vclogs.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cogs/vclogs.py b/cogs/vclogs.py index ed0737b..a9672ac 100644 --- a/cogs/vclogs.py +++ b/cogs/vclogs.py | |||
| @@ -66,6 +66,7 @@ class VcLogs(commands.Cog): | |||
| 66 | else: | 66 | else: |
| 67 | with open('settings.json', 'w') as f: | 67 | with open('settings.json', 'w') as f: |
| 68 | json.dump({'volume': '5'}, f, indent=4) | 68 | json.dump({'volume': '5'}, f, indent=4) |
| 69 | logger.info("settings.json created") | ||
| 69 | 70 | ||
| 70 | audio_source = discord.FFmpegPCMAudio('temp_tts.mp3', options=f'-filter:a "volume={volume}"') | 71 | audio_source = discord.FFmpegPCMAudio('temp_tts.mp3', options=f'-filter:a "volume={volume}"') |
| 71 | voice_client.play(audio_source) | 72 | voice_client.play(audio_source) |
| @@ -81,9 +82,11 @@ class VcLogs(commands.Cog): | |||
| 81 | if not os.path.exists('settings.json'): | 82 | if not os.path.exists('settings.json'): |
| 82 | with open('settings.json', 'w') as f: | 83 | with open('settings.json', 'w') as f: |
| 83 | json.dump({'volume': '5'}, f, indent=4) | 84 | json.dump({'volume': '5'}, f, indent=4) |
| 85 | logger.info("settings.json created") | ||
| 84 | with open('settings.json', 'w') as f: | 86 | with open('settings.json', 'w') as f: |
| 85 | json.dump({"volume": volume}, f, indent=4) | 87 | json.dump({"volume": volume}, f, indent=4) |
| 86 | await ctx.followup.send(f"Volume has been set to: {volume}") | 88 | await ctx.followup.send(f"Volume has been set to: {volume}") |
| 89 | logger.info(f"Volume changed to: {volume}") | ||
| 87 | except Exception as e: | 90 | except Exception as e: |
| 88 | await ctx.respond(e, ephemeral=True) | 91 | await ctx.respond(e, ephemeral=True) |
| 89 | logger.error(f"Error in volume command: {e}", exc_info=True) | 92 | logger.error(f"Error in volume command: {e}", exc_info=True) |
