diff options
| author | Rapptz <[email protected]> | 2015-12-08 06:51:46 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-12-08 06:51:46 -0500 |
| commit | 60945868b42b14bd0fc95b5013c16aa7bac9040d (patch) | |
| tree | 70302c635cd83905a9e11df2fad67cc52a520812 /discord | |
| parent | Working voice sending implementation. (diff) | |
| download | discord.py-60945868b42b14bd0fc95b5013c16aa7bac9040d.tar.xz discord.py-60945868b42b14bd0fc95b5013c16aa7bac9040d.zip | |
Clear up some documentation.
Diffstat (limited to 'discord')
| -rw-r--r-- | discord/__init__.py | 1 | ||||
| -rw-r--r-- | discord/voice_client.py | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/discord/__init__.py b/discord/__init__.py index 476f2419..b987a054 100644 --- a/discord/__init__.py +++ b/discord/__init__.py @@ -32,6 +32,7 @@ from .invite import Invite from .object import Object from . import utils from . import opus +from .voice_client import VoiceClient import logging diff --git a/discord/voice_client.py b/discord/voice_client.py index a5da879f..6e631ea9 100644 --- a/discord/voice_client.py +++ b/discord/voice_client.py @@ -99,6 +99,14 @@ class VoiceClient: This client is created solely through :meth:`Client.join_voice_channel` and its only purpose is to transmit voice. + Warning + -------- + In order to play audio, you must have loaded the opus library + through :func:`opus.load_opus`. + + If you don't do this then the library will not be able to + transmit audio. + Attributes ----------- session_id : str @@ -392,6 +400,11 @@ class VoiceClient: | player.is_done() | Returns a bool indicating if the stream is done. | +------------------+--------------------------------------------------+ + The stream must have the same sampling rate as the encoder and the same + number of channels. The defaults are 48000 Mhz and 2 channels. You + could change the encoder options by using :meth:`encoder_options` + but this must be called **before** this function. + Parameters ----------- stream |