Discord.C++ 0.13.0
Loading...
Searching...
No Matches
DiscordCPP::VoiceChannel Class Reference

#include <VoiceChannel.h>

Inheritance diagram for DiscordCPP::VoiceChannel:
DiscordCPP::Channel DiscordCPP::DiscordObject

Public Member Functions

 VoiceChannel (Discord *client, const json &data, const std::string &token)
 
 VoiceChannel (Discord *client, const std::string &id, const std::string &token)
 
 VoiceChannel ()=default
 
std::shared_ptr< VoiceClientconnect ()
 connect to this VoiceChannel
 
int get_bitrate ()
 
int get_user_limit ()
 
std::optional< Channelget_parent ()
 
- Public Member Functions inherited from DiscordCPP::Channel
 Channel (const json &data, const std::string &token)
 
 Channel (const std::string &id, const std::string &token)
 
 Channel (const std::string &token)
 
 Channel ()=default
 
void delete_channel ()
 Delete this channel.
 
 operator std::string ()
 
Type get_type ()
 
int32_t get_position ()
 
std::string get_name ()
 
std::string get_icon ()
 
- Public Member Functions inherited from DiscordCPP::DiscordObject
 DiscordObject ()=default
 
 DiscordObject (std::string token)
 
 DiscordObject (std::string token, std::string id)
 
std::string get_id () const
 

Additional Inherited Members

- Public Types inherited from DiscordCPP::Channel
enum  Type {
  GUILD_TEXT = 0 , DM = 1 , GUILD_VOICE = 2 , GROUP_DM = 3 ,
  GUILD_CATEGORY = 4 , GUILD_NEWS = 5 , GUILD_NEWS_THREAD = 10 , GUILD_PUBLIC_THREAD = 11 ,
  GUILD_PRIVATE_THREAD = 12 , GUILD_STAGE_VOICE = 13 , GUILD_DIRECTORY = 14 , GUILD_FORUM = 15
}
 
- Protected Member Functions inherited from DiscordCPP::DiscordObject
std::string get_token () const
 
json api_call (const std::string &url, const std::string &method="GET", const json &data=json(), const std::string &content_type="", const bool cache=true)
 helper function to communicate with the http api
 

Constructor & Destructor Documentation

◆ VoiceChannel() [1/3]

DiscordCPP::VoiceChannel::VoiceChannel ( Discord * client,
const json & data,
const std::string & token )

◆ VoiceChannel() [2/3]

DiscordCPP::VoiceChannel::VoiceChannel ( Discord * client,
const std::string & id,
const std::string & token )

◆ VoiceChannel() [3/3]

DiscordCPP::VoiceChannel::VoiceChannel ( )
default

Member Function Documentation

◆ connect()

std::shared_ptr< DiscordCPP::VoiceClient > DiscordCPP::VoiceChannel::connect ( )

connect to this VoiceChannel

◆ get_bitrate()

int DiscordCPP::VoiceChannel::get_bitrate ( )
inline
Returns
the channel's bitrate

◆ get_parent()

std::optional< DiscordCPP::Channel > DiscordCPP::VoiceChannel::get_parent ( )
Returns
the parent category channel

◆ get_user_limit()

int DiscordCPP::VoiceChannel::get_user_limit ( )
inline
Returns
the channel's user-limit

The documentation for this class was generated from the following files: