aboutsummaryrefslogtreecommitdiffstats
path: root/cogs/voice.py
diff options
context:
space:
mode:
authorsalmonik <raisersoft@proton.me>2026-04-19 15:43:32 +0200
committersalmonik <raisersoft@proton.me>2026-04-19 15:43:32 +0200
commit1dcdbe3cf03ff16b3ff2e2e6d572e0b3c72c18c0 (patch)
treef11dc45777d8b3c8ff0e2ca16be83f85b272bd48 /cogs/voice.py
parenttest: add cron tests + improve existing tests (diff)
downloadsenator-sperma-1dcdbe3cf03ff16b3ff2e2e6d572e0b3c72c18c0.tar.gz
senator-sperma-1dcdbe3cf03ff16b3ff2e2e6d572e0b3c72c18c0.zip
refactor: simplify cogs, reduce complexity
- Remove unused imports and dead code - Cleaner error handling - Reduce cognitive complexity
Diffstat (limited to '')
-rw-r--r--cogs/voice.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cogs/voice.py b/cogs/voice.py
index 07015cc..319bb16 100644
--- a/cogs/voice.py
+++ b/cogs/voice.py
@@ -95,7 +95,7 @@ class VoiceManager:
95 if not voice_client: 95 if not voice_client:
96 return False 96 return False
97 97
98 if volume != 1.0: 98 if abs(volume - 1.0) > 1e-9:
99 audio_source = discord.PCMVolumeTransformer(audio_source) 99 audio_source = discord.PCMVolumeTransformer(audio_source)
100 audio_source.volume = volume 100 audio_source.volume = volume
101 101
@@ -197,4 +197,4 @@ class Voice(commands.Cog):
197 197
198 198
199def setup(bot): 199def setup(bot):
200 bot.add_cog(Voice(bot)) \ No newline at end of file 200 bot.add_cog(Voice(bot))