summaryrefslogtreecommitdiff
path: root/src/discord/voicestate.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2024-07-05 03:51:58 -0400
committerGitHub <noreply@github.com>2024-07-05 03:51:58 -0400
commit68db143c8939e12dd569d6ac737213ad856c139b (patch)
treed5e814329fb19912b69b9804fc68b852674d8277 /src/discord/voicestate.hpp
parente6191d95341d164eacaf91739c8aa7020dd5c9b6 (diff)
parentb19782c16dffd38ac5651641131a48f8ff961b32 (diff)
downloadabaddon-portaudio-68db143c8939e12dd569d6ac737213ad856c139b.tar.gz
abaddon-portaudio-68db143c8939e12dd569d6ac737213ad856c139b.zip
Merge pull request #279 from uowuo/stages
Support for stages
Diffstat (limited to 'src/discord/voicestate.hpp')
-rw-r--r--src/discord/voicestate.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/discord/voicestate.hpp b/src/discord/voicestate.hpp
new file mode 100644
index 0000000..cc75b0c
--- /dev/null
+++ b/src/discord/voicestate.hpp
@@ -0,0 +1,29 @@
+#pragma once
+#include <cstdint>
+#include <optional>
+#include <string>
+#include "misc/bitwise.hpp"
+
+// this is packed into a enum cuz it makes implementing tree models easier
+enum class VoiceStateFlags : uint8_t {
+ Clear = 0,
+ Deaf = 1 << 0,
+ Mute = 1 << 1,
+ SelfDeaf = 1 << 2,
+ SelfMute = 1 << 3,
+ SelfStream = 1 << 4,
+ SelfVideo = 1 << 5,
+ Suppressed = 1 << 6,
+};
+
+struct PackedVoiceState {
+ VoiceStateFlags Flags;
+ std::optional<std::string> RequestToSpeakTimestamp;
+
+ [[nodiscard]] bool IsSpeaker() const noexcept;
+};
+
+template<>
+struct Bitwise<VoiceStateFlags> {
+ static const bool enable = true;
+};