mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 10:53:10 +00:00
Improve documentation
This commit is contained in:
@ -84,7 +84,7 @@ class VoiceClient:
|
||||
The endpoint we are connecting to.
|
||||
channel: :class:`abc.Connectable`
|
||||
The voice channel connected to.
|
||||
loop
|
||||
loop: :class:`asyncio.AbstractEventLoop`
|
||||
The event loop that the voice client is running on.
|
||||
"""
|
||||
def __init__(self, state, timeout, channel):
|
||||
@ -301,7 +301,7 @@ class VoiceClient:
|
||||
await self.main_ws.voice_state(guild_id, channel.id)
|
||||
|
||||
def is_connected(self):
|
||||
""":class:`bool`: Indicates if the voice client is connected to voice."""
|
||||
"""Indicates if the voice client is connected to voice."""
|
||||
return self._connected.is_set()
|
||||
|
||||
# audio related
|
||||
@ -345,7 +345,7 @@ class VoiceClient:
|
||||
-----------
|
||||
source: :class:`AudioSource`
|
||||
The audio source we're reading from.
|
||||
after
|
||||
after: Callable[[:class:`Exception`], Any]
|
||||
The finalizer that is called after the stream is exhausted.
|
||||
All exceptions it throws are silently discarded. This function
|
||||
must have a single parameter, ``error``, that denotes an
|
||||
@ -420,16 +420,16 @@ class VoiceClient:
|
||||
|
||||
Parameters
|
||||
----------
|
||||
data: bytes
|
||||
data: :class:`bytes`
|
||||
The :term:`py:bytes-like object` denoting PCM or Opus voice data.
|
||||
encode: bool
|
||||
encode: :class:`bool`
|
||||
Indicates if ``data`` should be encoded into Opus.
|
||||
|
||||
Raises
|
||||
-------
|
||||
ClientException
|
||||
You are not connected.
|
||||
OpusError
|
||||
opus.OpusError
|
||||
Encoding the data failed.
|
||||
"""
|
||||
|
||||
|
Reference in New Issue
Block a user