![]() |
D++ (DPP)
C++ Discord API Bot Library
|
Represents a connection to a voice channel. A client can only connect to one voice channel per guild at a time, so these are stored in a map in the dpp::discord_client keyed by guild_id. More...
Inheritance diagram for dpp::voiceconn:
Collaboration diagram for dpp::voiceconn:Public Member Functions | |
| voiceconn (class discord_client *o, voice_connection_gateway_request_callback_t request_callback, snowflake guild_id, snowflake channel_id, bool enable_dave) | |
| Construct a new voiceconn object. More... | |
| ~voiceconn () | |
| Destroy the voiceconn object. More... | |
| voiceconn & | connect () |
| Create websocket object and connect it. Needs hostname, token and session_id to be set or does nothing. More... | |
| voiceconn & | disconnect () |
| Disconnect from the currently connected voice channel. More... | |
| bool | is_active () const |
| return true if the connection is active (websocket exists) More... | |
| bool | is_ready () const |
| return true if the connection is ready to connect (has hostname, token and session id) More... | |
| void | reassign_owner (class discord_client *o) |
| Reassigns the owner to the given discord_client. More... | |
| voiceconn & | request () |
Public Attributes | |
| snowflake | channel_id |
| Voice Channel ID. More... | |
| bool | dave |
| True to enable DAVE E2EE. More... | |
| snowflake | guild_id |
| Guild to connect to the voice channel on. More... | |
| std::string | session_id |
| Voice Voice session ID. More... | |
| std::string | token |
| Voice websocket token. More... | |
| std::unique_ptr< class discord_voice_client > | voiceclient |
| voice websocket client More... | |
| std::string | websocket_hostname |
| Websocket hostname for status. More... | |
Represents a connection to a voice channel. A client can only connect to one voice channel per guild at a time, so these are stored in a map in the dpp::discord_client keyed by guild_id.
| dpp::voiceconn::voiceconn | ( | class discord_client * | o, |
| voice_connection_gateway_request_callback_t | request_callback, | ||
| snowflake | guild_id, | ||
| snowflake | channel_id, | ||
| bool | enable_dave | ||
| ) |
Construct a new voiceconn object.
| o | owner |
| request_callback | Function to ask a discord_client instance to make a request to Gateway to connect to a voice channel |
| guild_id | Guild to connect to the voice channel on |
| channel_id | voice channel id |
| enable_dave | True to enable DAVE E2EE |
| dpp::voiceconn::~voiceconn | ( | ) |
Destroy the voiceconn object.
| voiceconn& dpp::voiceconn::connect | ( | ) |
Create websocket object and connect it. Needs hostname, token and session_id to be set or does nothing.
| voiceconn& dpp::voiceconn::disconnect | ( | ) |
Disconnect from the currently connected voice channel.
| bool dpp::voiceconn::is_active | ( | ) | const |
return true if the connection is active (websocket exists)
| bool dpp::voiceconn::is_ready | ( | ) | const |
return true if the connection is ready to connect (has hostname, token and session id)
| void dpp::voiceconn::reassign_owner | ( | class discord_client * | o | ) |
Reassigns the owner to the given discord_client.
| voiceconn& dpp::voiceconn::request | ( | ) |
| snowflake dpp::voiceconn::channel_id |
Voice Channel ID.
| bool dpp::voiceconn::dave |
True to enable DAVE E2EE.
| snowflake dpp::voiceconn::guild_id |
Guild to connect to the voice channel on.
| std::string dpp::voiceconn::session_id |
Voice Voice session ID.
| std::string dpp::voiceconn::token |
Voice websocket token.
| std::unique_ptr<class discord_voice_client> dpp::voiceconn::voiceclient |
voice websocket client
| std::string dpp::voiceconn::websocket_hostname |
Websocket hostname for status.