![]() |
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>
Collaboration diagram for dpp::voiceconn:Public Member Functions | |
| voiceconn ()=default | |
| Construct a new voiceconn object. More... | |
| voiceconn (class discord_client *o, snowflake _channel_id) | |
| Construct a new voiceconn object. More... | |
| ~voiceconn () | |
| Destroy the voiceconn object. More... | |
| voiceconn & | connect (snowflake guild_id) |
| Create websocket object and connect it. Needs hosname, token and session_id to be set or does nothing. More... | |
| voiceconn & | disconnect () |
| Disconnect from the currently connected voice channel. More... | |
| bool | is_active () |
| return true if the connection is active (websocket exists) More... | |
| bool | is_ready () |
| return true if the connection is ready to connect (has hostname, token and session id) More... | |
Public Attributes | |
| snowflake | channel_id |
| Voice Channel ID. 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... | |
| 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.
|
default |
Construct a new voiceconn object.
| dpp::voiceconn::voiceconn | ( | class discord_client * | o, |
| snowflake | _channel_id | ||
| ) |
Construct a new voiceconn object.
| o | owner |
| _channel_id | voice channel id |
| dpp::voiceconn::~voiceconn | ( | ) |
Destroy the voiceconn object.
Create websocket object and connect it. Needs hosname, 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 | ( | ) |
return true if the connection is active (websocket exists)
| bool dpp::voiceconn::is_ready | ( | ) |
return true if the connection is ready to connect (has hostname, token and session id)
| snowflake dpp::voiceconn::channel_id |
Voice Channel ID.
| 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.