summaryrefslogtreecommitdiff
path: root/src/discord/discord.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2022-11-08 04:01:54 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2022-11-08 04:01:54 -0500
commit047168873235c3d835aaf9836f549de08bd96a47 (patch)
tree6c2a862253e0192795ac4df25fc19b8fcd226754 /src/discord/discord.cpp
parentf97a6ff266881936c2885c3265ae20524d66c874 (diff)
downloadabaddon-portaudio-047168873235c3d835aaf9836f549de08bd96a47.tar.gz
abaddon-portaudio-047168873235c3d835aaf9836f549de08bd96a47.zip
add ability to set capture device
Diffstat (limited to 'src/discord/discord.cpp')
-rw-r--r--src/discord/discord.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/discord/discord.cpp b/src/discord/discord.cpp
index cc066cc..2a08574 100644
--- a/src/discord/discord.cpp
+++ b/src/discord/discord.cpp
@@ -1,6 +1,7 @@
#include "abaddon.hpp"
#include "discord.hpp"
#include "util.hpp"
+#include <spdlog/spdlog.h>
#include <cinttypes>
#include <utility>
@@ -2168,7 +2169,7 @@ void DiscordClient::HandleGatewayVoiceStateUpdate(const GatewayMessage &msg) {
VoiceState data = msg.Data;
if (data.UserID == m_user_data.ID) {
- printf("voice session id: %s\n", data.SessionID.c_str());
+ spdlog::get("discord")->debug("Voice session ID: {}", data.SessionID);
m_voice.SetSessionID(data.SessionID);
} else {
if (data.GuildID.has_value() && data.Member.has_value()) {
@@ -2197,8 +2198,8 @@ void DiscordClient::HandleGatewayVoiceStateUpdate(const GatewayMessage &msg) {
void DiscordClient::HandleGatewayVoiceServerUpdate(const GatewayMessage &msg) {
VoiceServerUpdateData data = msg.Data;
- printf("endpoint: %s\n", data.Endpoint.c_str());
- printf("token: %s\n", data.Token.c_str());
+ spdlog::get("discord")->debug("Voice server endpoint: {}", data.Endpoint);
+ spdlog::get("discord")->debug("Voice token: {}", data.Token);
m_voice.SetEndpoint(data.Endpoint);
m_voice.SetToken(data.Token);
if (data.GuildID.has_value()) {
@@ -2206,7 +2207,7 @@ void DiscordClient::HandleGatewayVoiceServerUpdate(const GatewayMessage &msg) {
} else if (data.ChannelID.has_value()) {
m_voice.SetServerID(*data.ChannelID);
} else {
- puts("no guild or channel id in voice server?");
+ spdlog::get("discord")->error("No guild or channel ID in voice server?");
}
m_voice.SetUserID(m_user_data.ID);
m_voice.Start();