finishising play func

This commit is contained in:
2022-08-23 02:23:27 +03:00
parent 3e7a812fdc
commit 10990a86a4
3 changed files with 30 additions and 28 deletions

View File

@@ -1,9 +1,14 @@
import logging
import random
from asyncio import sleep
from disnake import FFmpegPCMAudio
async def play_audio(audio, bot, vc):
async def play_audio(full_audio, bot, vc):
if not bot.voice_clients:
audio = random.choice(full_audio)
logging.error(f'Playing: {audio}')
await sleep(1)
vp = await vc.connect()
if not vp.is_playing():