mirror of
				https://github.com/Rapptz/discord.py.git
				synced 2025-10-28 20:13:02 +00:00 
			
		
		
		
	Clear up some documentation.
This commit is contained in:
		| @@ -32,6 +32,7 @@ from .invite import Invite | |||||||
| from .object import Object | from .object import Object | ||||||
| from . import utils | from . import utils | ||||||
| from . import opus | from . import opus | ||||||
|  | from .voice_client import VoiceClient | ||||||
|  |  | ||||||
| import logging | import logging | ||||||
|  |  | ||||||
|   | |||||||
| @@ -99,6 +99,14 @@ class VoiceClient: | |||||||
|     This client is created solely through :meth:`Client.join_voice_channel` |     This client is created solely through :meth:`Client.join_voice_channel` | ||||||
|     and its only purpose is to transmit voice. |     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 |     Attributes | ||||||
|     ----------- |     ----------- | ||||||
|     session_id : str |     session_id : str | ||||||
| @@ -392,6 +400,11 @@ class VoiceClient: | |||||||
|         | player.is_done() | Returns a bool indicating if the stream is done. | |         | 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 |         Parameters | ||||||
|         ----------- |         ----------- | ||||||
|         stream |         stream | ||||||
|   | |||||||
							
								
								
									
										13
									
								
								docs/api.rst
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								docs/api.rst
									
									
									
									
									
								
							| @@ -20,6 +20,19 @@ Client | |||||||
| .. autoclass:: Client | .. autoclass:: Client | ||||||
|     :members: |     :members: | ||||||
|  |  | ||||||
|  |  | ||||||
|  | Voice | ||||||
|  | ----- | ||||||
|  |  | ||||||
|  | .. autoclass:: VoiceClient | ||||||
|  |     :members: | ||||||
|  |  | ||||||
|  |  | ||||||
|  | Opus Library | ||||||
|  | ~~~~~~~~~~~~~ | ||||||
|  |  | ||||||
|  | .. autofunction:: opus.load_opus | ||||||
|  |  | ||||||
| .. _discord-api-events: | .. _discord-api-events: | ||||||
|  |  | ||||||
| Event Reference | Event Reference | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user