DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
discord_core_api::connect_to_voice< value_type, discord_core_client_t, guild_members_type > Struct Template Reference

crtp-based struct for exposing the connectToVoice functionality of the guild-related classes. More...

#include <FoundationEntities.hpp>

Public Member Functions

voice_connectionconnectToVoice (const snowflake guildMemberId, const snowflake channelId=0, bool selfDeaf=false, bool selfMute=false, stream_info streamInfoNew=stream_info{})
 For connecting to an individual voice channel. More...
 

Member Function Documentation

◆ connectToVoice()

template<typename value_type , typename discord_core_client_t , typename guild_members_type >
voice_connection & discord_core_api::connect_to_voice< value_type, discord_core_client_t, guild_members_type >::connectToVoice ( const snowflake  guildMemberId,
const snowflake  channelId = 0,
bool  selfDeaf = false,
bool  selfMute = false,
stream_info  streamInfoNew = stream_info{} 
)
inline
Parameters
guildMemberIdan id of the guild member who's current voice channel to connect to.
channelIdan id of the voice channel to connect to.
selfDeafwhether or not to self-deafen the bot.
selfMutewhether or not to self-mute the bot.
streamInfoNewfor usage with the vc-to-vc audio streaming option.
Returns
voice_connection* a pointer to the currently held voice connection, or nullptr if it failed to connect.

Definition at line 2397 of file FoundationEntities.hpp.


The documentation for this struct was generated from the following file: