Browse Source

Documentation fixes for opus related import errors.

pull/57/head
Rapptz 9 years ago
parent
commit
9bec041423
  1. 7
      discord/opus.py
  2. 10
      docs/api.rst

7
discord/opus.py

@ -80,10 +80,11 @@ def load_opus(name):
"""Loads the libopus shared library for use with voice. """Loads the libopus shared library for use with voice.
If this function is not called then the library uses the function If this function is not called then the library uses the function
`ctypes.util.find_library <find_library>` and then loads that one `ctypes.util.find_library`__ and then loads that one
if available. if available.
.. find_library: https://docs.python.org/3.5/library/ctypes.html#finding-shared-libraries .. _find library: https://docs.python.org/3.5/library/ctypes.html#finding-shared-libraries
__ `find library`_
Not loading a library leads to voice not working. Not loading a library leads to voice not working.
@ -100,7 +101,7 @@ def load_opus(name):
---- ----
On Windows, the .dll extension is not necessary. However, on Linux On Windows, the .dll extension is not necessary. However, on Linux
the full extension is required to load the library, e.g. ``libopus.so.1``. the full extension is required to load the library, e.g. ``libopus.so.1``.
On Linux however, `find_library`_ will usually find the library automatically On Linux however, `find library`_ will usually find the library automatically
without you having to call this. without you having to call this.
Parameters Parameters

10
docs/api.rst

@ -31,14 +31,14 @@ Voice
Opus Library Opus Library
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
.. autofunction:: opus.load_opus .. autofunction:: discord.opus.load_opus
.. autofunction:: opus.is_loaded .. autofunction:: discord.opus.is_loaded
.. _discord-api-events: .. _discord-api-events:
Event Reference Event Reference
~~~~~~~~~~~~~~~~ ---------------
This page outlines the different types of events listened by :class:`Client`. This page outlines the different types of events listened by :class:`Client`.
@ -459,6 +459,6 @@ The following exceptions are thrown by the library.
.. autoexception:: GatewayNotFound .. autoexception:: GatewayNotFound
.. autoexception:: opus.OpusError .. autoexception:: discord.opus.OpusError
.. autoexception:: opus.OpusNotLoaded .. autoexception:: discord.opus.OpusNotLoaded

Loading…
Cancel
Save