From 0ab77a89f0d8dee0b99a86653fb8f5de519c7349 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 6 Aug 2021 17:11:08 +0200 Subject: [PATCH] loop --- src/cogs/music.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/cogs/music.py b/src/cogs/music.py index 464c901..c67ce37 100644 --- a/src/cogs/music.py +++ b/src/cogs/music.py @@ -23,13 +23,15 @@ class Music(commands.Cog): async def start_nodes(self): await self.client.wait_until_ready() - - await self.client.wavelink.initiate_node(host = "127.0.0.1", - port = 2333, - rest_uri = "http://127.0.0.1:2333", - password = "youshallnotpass", - identifier = "PROD", - region = self.keys["REGION_DISCORD"]) + try: + await self.client.wavelink.initiate_node(host = "127.0.0.1", + port = 2333, + rest_uri = "http://127.0.0.1:2333", + password = "youshallnotpass", + identifier = "PROD", + region = self.keys["REGION_DISCORD"]) + except: + await self.start_nodes() @commands.command(name='connect') async def connect_(self, ctx, *, channel: discord.VoiceChannel = None):