Skip to content

Commit c2ba721

Browse files
committed
replace if block with str.removeprefix
1 parent 1e5369d commit c2ba721

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

discord/voice_client.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,7 @@ async def on_voice_server_update(self, data: VoiceServerUpdatePayload) -> None:
325325
)
326326
return
327327

328-
self.endpoint = endpoint
329-
if self.endpoint.startswith("wss://"):
330-
# Just in case, strip it off since we're going to add it later
331-
self.endpoint = self.endpoint[6:]
332-
328+
self.endpoint = endpoint.removeprefix("wss://")
333329
# This gets set later
334330
self.endpoint_ip = MISSING
335331

0 commit comments

Comments
 (0)