some code changes
This commit is contained in:
@@ -1,16 +1,12 @@
|
||||
import logging
|
||||
from .Logger import logger
|
||||
from asyncio import sleep
|
||||
from typing import Union, Optional
|
||||
|
||||
import disnake
|
||||
from disnake import FFmpegPCMAudio
|
||||
from disnake.ext import commands
|
||||
|
||||
|
||||
async def play_audio(audio, bot, vc):
|
||||
if not bot.voice_clients:
|
||||
logging.info(audio)
|
||||
logging.error(f'Playing: {audio}')
|
||||
logger.info(audio)
|
||||
logger.error(f'Playing: {audio}')
|
||||
await sleep(1)
|
||||
vp = await vc.connect()
|
||||
if not vp.is_playing():
|
||||
@@ -19,11 +15,3 @@ async def play_audio(audio, bot, vc):
|
||||
await sleep(0.5)
|
||||
await sleep(1)
|
||||
await vp.disconnect()
|
||||
|
||||
|
||||
async def get_audio_list(inter: Union[disnake.ApplicationCommandInteraction, commands.Context],
|
||||
search: Optional[str],
|
||||
return_embed: bool = False,
|
||||
) -> None:
|
||||
|
||||
await list_files()
|
||||
|
||||
Reference in New Issue
Block a user