aboutsummaryrefslogtreecommitdiffstats
path: root/cogs/music/stop.py
diff options
context:
space:
mode:
authorsalmonik <raisersoft@proton.me>2026-05-20 15:40:18 +0200
committersalmonik <raisersoft@proton.me>2026-05-20 15:40:18 +0200
commit4663f260b55de0975661fda1c00f60d2ca6e4506 (patch)
treeb649850859595542f8e7916a5513e0840e911318 /cogs/music/stop.py
parentFix TTS and AI voice playback bugs (diff)
downloadsenator-sperma-4663f260b55de0975661fda1c00f60d2ca6e4506.tar.gz
senator-sperma-4663f260b55de0975661fda1c00f60d2ca6e4506.zip
Clean up consumers: replace polling with VoiceManager.play_source()
- cron.py: replace while-is_playing polling with VoiceManager.play_source() - vclogs.py: replace while-is_playing polling with VoiceManager.play_source() - stop.py: use VoiceManager.disconnect() instead of raw voice_client - join.py: use VoiceManager.connect() instead of raw channel.connect() - voice.py: add back join_by_channel_id() convenience method - Tests: update for new VoiceManager method names and signatures
Diffstat (limited to 'cogs/music/stop.py')
-rw-r--r--cogs/music/stop.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cogs/music/stop.py b/cogs/music/stop.py
index f06e7f5..9c8d5cf 100644
--- a/cogs/music/stop.py
+++ b/cogs/music/stop.py
@@ -5,6 +5,8 @@
5 5
6from discord.ext import commands 6from discord.ext import commands
7 7
8from cogs.voice import get_voice_manager
9
8import logging 10import logging
9 11
10logger = logging.getLogger(__name__) 12logger = logging.getLogger(__name__)
@@ -18,7 +20,8 @@ class Stop(commands.Cog):
18 async def stop(self, ctx): 20 async def stop(self, ctx):
19 await ctx.respond(content="\u200b", ephemeral=True) 21 await ctx.respond(content="\u200b", ephemeral=True)
20 await ctx.interaction.delete_original_response() 22 await ctx.interaction.delete_original_response()
21 await ctx.voice_client.disconnect() 23 voice_mgr = get_voice_manager(self.bot)
24 await voice_mgr.disconnect(ctx.guild)
22 logger.info("Bot disconnected from voice channel") 25 logger.info("Bot disconnected from voice channel")
23 26
24 27