removes tests
This commit is contained in:
parent
06d7e9d795
commit
82de6f31b7
1 changed files with 9 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
|||
import discord
|
||||
from subprocess import Popen, DEVNULL
|
||||
from wavelink import Client as wClient, errors
|
||||
from wavelink import Client as wClient
|
||||
from discord.ext import commands
|
||||
from utils.core import load
|
||||
|
||||
|
@ -23,15 +23,13 @@ class Music(commands.Cog):
|
|||
|
||||
async def start_nodes(self):
|
||||
await self.client.wait_until_ready()
|
||||
try:
|
||||
await self.client.wavelink.initiate_node(host = "0.0.0.0",
|
||||
port = 2333,
|
||||
rest_uri = "http://0.0.0.0:2333",
|
||||
password = "youshallnotpass",
|
||||
identifier = "PROD",
|
||||
region = self.keys["REGION_DISCORD"])
|
||||
except:
|
||||
await self.start_nodes()
|
||||
|
||||
await self.client.wavelink.initiate_node(host = "0.0.0.0",
|
||||
port = 2333,
|
||||
rest_uri = "http://0.0.0.0:2333",
|
||||
password = "youshallnotpass",
|
||||
identifier = "PROD",
|
||||
region = self.keys["REGION_DISCORD"])
|
||||
|
||||
@commands.command(name='connect')
|
||||
async def connect_(self, ctx, *, channel: discord.VoiceChannel = None):
|
||||
|
@ -47,12 +45,7 @@ class Music(commands.Cog):
|
|||
|
||||
@commands.command()
|
||||
async def play(self, ctx, *, query: str):
|
||||
try:
|
||||
tracks = await self.client.wavelink.get_tracks(f"ytsearch:{query}")
|
||||
except errors.ZeroConnectedNodes:
|
||||
print("bug")
|
||||
await self.start_nodes()
|
||||
await self.play(ctx, query)
|
||||
tracks = await self.client.wavelink.get_tracks(f"ytsearch:{query}")
|
||||
|
||||
if not tracks:
|
||||
return await ctx.send("Je n'ai pas trouvé la musique demandé.")
|
||||
|
|
Reference in a new issue