mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Add versionadded to VoiceClient latency and average_latency
This commit is contained in:
@ -214,13 +214,18 @@ class VoiceClient:
|
||||
|
||||
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.
|
||||
|
||||
.. versionadded:: 1.4
|
||||
"""
|
||||
ws = self.ws
|
||||
return float("inf") if not ws else ws.latency
|
||||
|
||||
@property
|
||||
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
|
||||
"""
|
||||
ws = self.ws
|
||||
return float("inf") if not ws else ws.average_latency
|
||||
|
||||
|
Reference in New Issue
Block a user