mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-02 00:00:02 +00:00
parent
fc951873a1
commit
a9824ffabf
@ -187,8 +187,9 @@ class VoiceClient:
|
|||||||
'If timeout occurred considering raising the timeout and reconnecting.')
|
'If timeout occurred considering raising the timeout and reconnecting.')
|
||||||
return
|
return
|
||||||
|
|
||||||
self.endpoint = endpoint.replace(':80', '')
|
self.endpoint, _, _ = endpoint.rpartition(':')
|
||||||
self.endpoint_ip = socket.gethostbyname(self.endpoint)
|
# This gets set later
|
||||||
|
self.endpoint_ip = None
|
||||||
|
|
||||||
if self.socket:
|
if self.socket:
|
||||||
try:
|
try:
|
||||||
@ -214,7 +215,7 @@ class VoiceClient:
|
|||||||
|
|
||||||
This could be referred to as the Discord Voice WebSocket latency and is
|
This could be referred to as the Discord Voice WebSocket latency and is
|
||||||
an analogue of user's voice latencies as seen in the Discord client.
|
an analogue of user's voice latencies as seen in the Discord client.
|
||||||
|
|
||||||
.. versionadded:: 1.4
|
.. versionadded:: 1.4
|
||||||
"""
|
"""
|
||||||
ws = self.ws
|
ws = self.ws
|
||||||
@ -223,7 +224,7 @@ class VoiceClient:
|
|||||||
@property
|
@property
|
||||||
def average_latency(self):
|
def average_latency(self):
|
||||||
""":class:`float`: Average of most recent 20 HEARTBEAT latencies in seconds.
|
""":class:`float`: Average of most recent 20 HEARTBEAT latencies in seconds.
|
||||||
|
|
||||||
.. versionadded:: 1.4
|
.. versionadded:: 1.4
|
||||||
"""
|
"""
|
||||||
ws = self.ws
|
ws = self.ws
|
||||||
|
Loading…
x
Reference in New Issue
Block a user