add set status for funsies

This commit is contained in:
ouwou
2020-11-01 02:53:37 -05:00
parent 18f4f7ce5e
commit 534bfccf23
13 changed files with 358 additions and 8 deletions

View File

@@ -83,6 +83,15 @@ void to_json(nlohmann::json &j, const LazyLoadRequestMessage &m) {
j["d"]["members"] = m.Members;
}
void to_json(nlohmann::json &j, const UpdateStatusMessage &m) {
j["op"] = GatewayOp::UpdateStatus;
j["d"] = nlohmann::json::object();
j["d"]["activities"] = m.Activities;
j["d"]["status"] = m.Status;
j["d"]["afk"] = m.IsAFK;
j["d"]["since"] = nullptr;
}
void from_json(const nlohmann::json &j, ReadyEventData &m) {
JS_D("v", m.GatewayVersion);
JS_D("user", m.User);