make compile work if voice support is disabled

This commit is contained in:
ouwou
2022-09-02 01:25:33 -04:00
parent 9c8d9e54fe
commit 0a04985678
14 changed files with 99 additions and 9 deletions

View File

@@ -641,6 +641,7 @@ void from_json(const nlohmann::json &j, GuildMembersChunkData &m) {
JS_D("guild_id", m.GuildID);
}
#ifdef WITH_VOICE
void to_json(nlohmann::json &j, const VoiceStateUpdateMessage &m) {
j["op"] = GatewayOp::VoiceStateUpdate;
j["d"]["guild_id"] = m.GuildID;
@@ -661,3 +662,4 @@ void from_json(const nlohmann::json &j, VoiceServerUpdateData &m) {
JS_D("guild_id", m.GuildID);
JS_D("endpoint", m.Endpoint);
}
#endif