DiscordVoiceManagerDelegate
public protocol DiscordVoiceManagerDelegate : class, DiscordTokenBearer
A delegate for a VoiceManager.
-
Called when an engine disconnects.
Declaration
Swift
func voiceManager(_ manager: DiscordVoiceManager, didDisconnectEngine engine: DiscordVoiceEngine)
Parameters
manager
The manager.
engine
The engine that disconnected.
-
Called when a voice engine receives opus voice data.
Declaration
Swift
func voiceManager(_ manager: DiscordVoiceManager, didReceiveOpusVoiceData data: DiscordOpusVoiceData,
Parameters
manager
The manager.
didReceiveOpusVoiceData
The data received.
fromEngine
The engine that received the data.
-
Called when a voice engine receives raw voice data.
Declaration
Swift
func voiceManager(_ manager: DiscordVoiceManager, didReceiveRawVoiceData data: DiscordRawVoiceData,
Parameters
manager
The manager.
didReceiveRawVoiceData
The data received.
fromEngine
The engine that received the data.
-
Called when a voice engine is ready.
Declaration
Swift
func voiceManager(_ manager: DiscordVoiceManager, engineIsReady engine: DiscordVoiceEngine)
Parameters
manager
The manager.
engine
The engine that’s ready.
-
Called when a voice engine needs a data source.
Declaration
Swift
func voiceManager(_ manager: DiscordVoiceManager,
Parameters
manager
The manager that is requesting an encoder.
engine
The engine that needs an encoder
Return Value
A data source.