Discord Social SDK
|
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. | |
VoiceStateHandle & | operator= (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. | |
VoiceStateHandle & | operator= (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. | |
|
noexcept |
Move constructor for VoiceStateHandle.
discordpp::VoiceStateHandle::VoiceStateHandle | ( | const VoiceStateHandle & | other | ) |
Copy constructor for VoiceStateHandle.
|
inline |
Returns true if the instance contains a valid object.
VoiceStateHandle & discordpp::VoiceStateHandle::operator= | ( | const VoiceStateHandle & | other | ) |
Copy assignment operator for VoiceStateHandle.
|
noexcept |
Move assignment operator for VoiceStateHandle.
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.
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.
|
static |
Uninitialized instance of VoiceStateHandle.