Discord Social SDK
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
discordpp::VoiceStateHandle Class Reference

Detailed Description

A VoiceStateHandle represents the state of a single participant in a Discord voice call.

The main use case for VoiceStateHandle in the SDK is communicate whether a user has muted or defeaned themselves.

Handle objects in the SDK hold a reference both to the underlying data, and to the SDK instance. Changes to the underlying data will generally be available on existing handles objects without having to re-create them. If the SDK instance is destroyed, but you still have a reference to a handle object, note that it will return the default value for all method calls (ie an empty string for methods that return a string).

Public Member Functions

 VoiceStateHandle (VoiceStateHandle &&other) noexcept
 Move constructor for VoiceStateHandle.
 
VoiceStateHandleoperator= (VoiceStateHandle &&other) noexcept
 Move assignment operator for VoiceStateHandle.
 
 operator bool () const
 Returns true if the instance contains a valid object.
 
 VoiceStateHandle (const VoiceStateHandle &other)
 Copy constructor for VoiceStateHandle.
 
VoiceStateHandleoperator= (const VoiceStateHandle &other)
 Copy assignment operator for VoiceStateHandle.
 
bool SelfDeaf () const
 Returns true if the given user has deafened themselves so that no one else in the call can hear them and so that they do not hear anyone else in the call either.
 
bool SelfMute () const
 Returns true if the given user has muted themselves so that no one else in the call can hear them.
 

Static Public Attributes

static const VoiceStateHandle nullobj
 Uninitialized instance of VoiceStateHandle.
 

Constructor & Destructor Documentation

◆ VoiceStateHandle() [1/2]

discordpp::VoiceStateHandle::VoiceStateHandle ( VoiceStateHandle && other)
noexcept

Move constructor for VoiceStateHandle.

◆ VoiceStateHandle() [2/2]

discordpp::VoiceStateHandle::VoiceStateHandle ( const VoiceStateHandle & other)

Copy constructor for VoiceStateHandle.

Member Function Documentation

◆ operator bool()

discordpp::VoiceStateHandle::operator bool ( ) const
inline

Returns true if the instance contains a valid object.

◆ operator=() [1/2]

VoiceStateHandle & discordpp::VoiceStateHandle::operator= ( const VoiceStateHandle & other)

Copy assignment operator for VoiceStateHandle.

◆ operator=() [2/2]

VoiceStateHandle & discordpp::VoiceStateHandle::operator= ( VoiceStateHandle && other)
noexcept

Move assignment operator for VoiceStateHandle.

◆ SelfDeaf()

bool discordpp::VoiceStateHandle::SelfDeaf ( ) const

Returns true if the given user has deafened themselves so that no one else in the call can hear them and so that they do not hear anyone else in the call either.

◆ SelfMute()

bool discordpp::VoiceStateHandle::SelfMute ( ) const

Returns true if the given user has muted themselves so that no one else in the call can hear them.

Member Data Documentation

◆ nullobj

const VoiceStateHandle discordpp::VoiceStateHandle::nullobj
static

Uninitialized instance of VoiceStateHandle.