some refractor

This commit is contained in:
2022-08-29 00:38:13 +03:00
parent caa8d6b20e
commit 4a33b35283
9 changed files with 87 additions and 89 deletions

View File

@@ -1,7 +1,10 @@
import logging
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):
@@ -16,3 +19,11 @@ 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()