diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-09-02 01:25:33 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-09-02 01:25:33 -0400 |
commit | 0a049856782397a7464d03c317ce3788559cdeda (patch) | |
tree | 9412d17c0ab9335d591d7b4590043b9cc4e3cc45 /src/discord/discord.cpp | |
parent | 9c8d9e54fe96f97bdda2be26bab571e4cbf0c597 (diff) | |
download | abaddon-portaudio-0a049856782397a7464d03c317ce3788559cdeda.tar.gz abaddon-portaudio-0a049856782397a7464d03c317ce3788559cdeda.zip |
make compile work if voice support is disabled
Diffstat (limited to 'src/discord/discord.cpp')
-rw-r--r-- | src/discord/discord.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/discord/discord.cpp b/src/discord/discord.cpp index ed9b999..5670d4a 100644 --- a/src/discord/discord.cpp +++ b/src/discord/discord.cpp @@ -1169,6 +1169,7 @@ void DiscordClient::AcceptVerificationGate(Snowflake guild_id, VerificationGateI }); } +#ifdef WITH_VOICE void DiscordClient::ConnectToVoice(Snowflake channel_id) { auto channel = GetChannel(channel_id); if (!channel.has_value() || !channel->GuildID.has_value()) return; @@ -1178,6 +1179,7 @@ void DiscordClient::ConnectToVoice(Snowflake channel_id) { m.PreferredRegion = "newark"; m_websocket.Send(m); } +#endif void DiscordClient::SetReferringChannel(Snowflake id) { if (!id.IsValid()) { @@ -1498,12 +1500,14 @@ void DiscordClient::HandleGatewayMessage(std::string str) { case GatewayEvent::GUILD_MEMBERS_CHUNK: { HandleGatewayGuildMembersChunk(m); } break; +#ifdef WITH_VOICE case GatewayEvent::VOICE_STATE_UPDATE: { HandleGatewayVoiceStateUpdate(m); } break; case GatewayEvent::VOICE_SERVER_UPDATE: { HandleGatewayVoiceServerUpdate(m); } break; +#endif } } break; default: @@ -2114,6 +2118,7 @@ void DiscordClient::HandleGatewayGuildMembersChunk(const GatewayMessage &msg) { m_store.EndTransaction(); } +#ifdef WITH_VOICE void DiscordClient::HandleGatewayVoiceStateUpdate(const GatewayMessage &msg) { VoiceStateUpdateData data = msg.Data; if (data.UserID == m_user_data.ID) { @@ -2132,6 +2137,7 @@ void DiscordClient::HandleGatewayVoiceServerUpdate(const GatewayMessage &msg) { m_voice.SetUserID(m_user_data.ID); m_voice.Start(); } +#endif void DiscordClient::HandleGatewayReadySupplemental(const GatewayMessage &msg) { ReadySupplementalData data = msg.Data; |