From 3165fa06f87ec8c5a3dce4132be5ae8ec5351df2 Mon Sep 17 00:00:00 2001 From: Entarno54 Date: Mon, 5 May 2025 21:52:05 +0700 Subject: [PATCH] Fixes --- commands/voice.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commands/voice.py b/commands/voice.py index 9e72f39..20b4e20 100644 --- a/commands/voice.py +++ b/commands/voice.py @@ -3,6 +3,7 @@ from nextcord.ext import commands import yt_dlp import os import threading +import asyncio SquogFinalName: str = None SquogPlaying = { @@ -69,7 +70,7 @@ class Voice(commands.Cog): SquogVoiceClient = ctx.guild.voice_client - # Function i will pass to the thread + # Function I will pass to the thread def Process(): #Downloading the music SquogDownload.download(link) @@ -88,8 +89,10 @@ class Voice(commands.Cog): if SquogPlaying[ctx.guild.id] == True: while SquogPlaying[ctx.guild.id] == True: SquogVoiceClient.play(nextcord.FFmpegPCMAudio(f"{SquogEvilFilename}")) + while SquogVoiceClient.is_playing(): + asyncio.sleep(.2) else: - SquogPlaying[ctx.guild.id] == True + SquogVoiceClient.play(nextcord.FFmpegPCMAudio(f"{SquogEvilFilename}")) # I've to start this in a different thread because of how long some videos take to load...