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...
#include <discordclient.h>
Public Member Functions | |
voiceconn ()=default | |
Construct a new voiceconn object. More... | |
voiceconn (class discord_client *o, snowflake _channel_id, bool enable_dave) | |
Construct a new voiceconn object. More... | |
~voiceconn () | |
Destroy the voiceconn object. More... | |
bool | is_ready () const |
return true if the connection is ready to connect (has hostname, token and session id) More... | |
bool | is_active () const |
return true if the connection is active (websocket exists) More... | |
voiceconn & | connect (snowflake guild_id) |
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... | |
Public Attributes | |
snowflake | channel_id |
Voice Channel ID. More... | |
std::string | websocket_hostname |
Websocket hostname for status. More... | |
std::string | session_id |
Voice Voice session ID. More... | |
std::string | token |
Voice websocket token. More... | |
class discord_voice_client * | voiceclient |
voice websocket client More... | |
bool | dave |
True to enable DAVE E2EE. 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.
|
default |
Construct a new voiceconn object.
dpp::voiceconn::voiceconn | ( | class discord_client * | o, |
snowflake | _channel_id, | ||
bool | enable_dave | ||
) |
Construct a new voiceconn object.
o | owner |
_channel_id | voice channel id |
enable_dave | True to enable DAVE E2EE @warn DAVE is an EXPERIMENTAL feature! |
dpp::voiceconn::~voiceconn | ( | ) |
Destroy the voiceconn object.
Create websocket object and connect it. Needs hostname, token and session_id to be set or does nothing.
guild_id | Guild to connect to the voice channel on |
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)
snowflake dpp::voiceconn::channel_id |
Voice Channel ID.
bool dpp::voiceconn::dave |
True to enable DAVE E2EE.
std::string dpp::voiceconn::session_id |
Voice Voice session ID.
std::string dpp::voiceconn::token |
Voice websocket token.
class discord_voice_client* dpp::voiceconn::voiceclient |
voice websocket client
std::string dpp::voiceconn::websocket_hostname |
Websocket hostname for status.