From 9fa6732e025466cc64918ac91c770114ad680fa6 Mon Sep 17 00:00:00 2001 From: Draper <27962761+Drapersniper@users.noreply.github.com> Date: Tue, 15 Mar 2022 19:32:45 +0000 Subject: [PATCH] Fix and complete the secure connection implementation (#116) * Fix the partial implementation of a secure connection. * https 1 * address review Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> --- lavalink/rest_api.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lavalink/rest_api.py b/lavalink/rest_api.py index 02fd81f7..f70e2cb0 100644 --- a/lavalink/rest_api.py +++ b/lavalink/rest_api.py @@ -277,19 +277,15 @@ class RESTClient: Client class used to access the REST endpoints on a Lavalink node. """ - def __init__(self, node): - self.node = node - self.secured = node.secured + def __init__(self): + self.secured = self.node.secured self._session = self.node.session if self.secured: protocol = "https" else: protocol = "http" - self._uri = f"{protocol}://{node.host}:{node.port}/loadtracks?identifier=" - self._headers = {"Authorization": node.password} - - self.state = player.state - + self._uri = f"{protocol}://{self.node.host}:{self.node.port}/loadtracks?identifier=" + self._headers = {"Authorization": self.node.password} self._warned = False def __check_node_ready(self):