From 250f29989ba27cbe1891d565969d1b672423354a Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 5 Aug 2020 05:07:44 -0400 Subject: [PATCH] Be defensive in case Discord breaks something with WS URLs again --- discord/voice_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discord/voice_client.py b/discord/voice_client.py index 91a7f6cad..ab9a6406c 100644 --- a/discord/voice_client.py +++ b/discord/voice_client.py @@ -188,6 +188,10 @@ class VoiceClient: return self.endpoint, _, _ = endpoint.rpartition(':') + if self.endpoint.startswith('wss://'): + # Just in case, strip it off since we're going to add it later + self.endpoint = self.endpoint[6:] + # This gets set later self.endpoint_ip = None