initial yandex music
This commit is contained in:
@@ -5,9 +5,7 @@ from disnake import FFmpegOpusAudio
|
||||
|
||||
async def play_audio(audio, bot, vc):
|
||||
if not bot.voice_clients:
|
||||
# logger.info(audio)
|
||||
logger.error(f'Playing: {audio}')
|
||||
await sleep(1)
|
||||
vp = await vc.connect()
|
||||
if not vp.is_playing():
|
||||
vp.play(FFmpegOpusAudio(f'{audio}'))
|
||||
|
||||
10
lib/YandexPlayer.py
Normal file
10
lib/YandexPlayer.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import os
|
||||
|
||||
from yandex_music import Client
|
||||
|
||||
client = Client(os.getenv('Yandex_Token')).init()
|
||||
|
||||
|
||||
def _search(self, _str: str, _type: str):
|
||||
search_result = client.search(_str, type_=_type)
|
||||
pass
|
||||
Reference in New Issue
Block a user