Added base jsonlike return for player
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import disnake
|
||||
from disnake import Option
|
||||
from disnake.ext import commands
|
||||
|
||||
from lib import YandexPlayer
|
||||
from lib.Logger import logger
|
||||
|
||||
|
||||
@@ -13,13 +15,15 @@ class Testing(commands.Cog, name='Testing'):
|
||||
logger.info(f'Cog {__name__.split(".")[1]} is ready!.')
|
||||
|
||||
@commands.slash_command(name='play', description='play audio test from yandex.music', options=[
|
||||
Option(name='search', description='seach track/artist'),
|
||||
Option(name='type', description='type of search',
|
||||
choices=['all', 'artist', 'user', 'album', 'playlist', 'track', 'podcast', 'podcast_episode'])
|
||||
Option(name='search',
|
||||
description='seach track/artist',
|
||||
required=True),
|
||||
])
|
||||
async def play(self, inter: disnake.ApplicationCommandInteraction, audio):
|
||||
async def play(self, inter: disnake.ApplicationCommandInteraction, search: str):
|
||||
# TODO add yandex_music player with queue, playlists
|
||||
pass
|
||||
result = YandexPlayer.search(search)
|
||||
await inter.response.send_message(result, ephemeral=True)
|
||||
|
||||
|
||||
|
||||
def setup(bot): # an extension must have a setup function
|
||||
|
||||
Reference in New Issue
Block a user