diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-11-08 04:01:54 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-11-08 04:01:54 -0500 |
commit | 047168873235c3d835aaf9836f549de08bd96a47 (patch) | |
tree | 6c2a862253e0192795ac4df25fc19b8fcd226754 /src/discord/discord.cpp | |
parent | f97a6ff266881936c2885c3265ae20524d66c874 (diff) | |
download | abaddon-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.cpp | 9 |
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(); |