remove all job done

This commit is contained in:
Mylloon 2021-08-07 03:44:23 +02:00
parent 13312e3c90
commit 74dda53644

View file

@ -1,9 +1,7 @@
import discord import discord
from subprocess import Popen, DEVNULL
from wavelink import Client as wClient from wavelink import Client as wClient
from discord.ext import commands from discord.ext import commands
from utils.core import load from utils.core import load
from time import sleep
def setup(client): def setup(client):
client.add_cog(Music(client)) client.add_cog(Music(client))
@ -13,14 +11,9 @@ class Music(commands.Cog):
def __init__(self, client): def __init__(self, client):
self.client = client self.client = client
self.keys = load(["REGION_DISCORD"]) self.keys = load(["REGION_DISCORD"])
print("Démarrage du serveur Lavalink...", end = " ")
Popen(['java', '-jar', 'Lavalink.jar'], stdout = DEVNULL)
print("Lavalink prêt")
if not hasattr(client, 'wavelink'): if not hasattr(client, 'wavelink'):
self.client.wavelink = wClient(bot = self.client) self.client.wavelink = wClient(bot = self.client)
sleep(15)
self.client.loop.create_task(self.start_nodes()) self.client.loop.create_task(self.start_nodes())