diff --git a/src/dpp/events/entitlement_create.cpp b/src/dpp/events/entitlement_create.cpp index 5356f88b98..d2ed6b71cc 100644 --- a/src/dpp/events/entitlement_create.cpp +++ b/src/dpp/events/entitlement_create.cpp @@ -35,7 +35,8 @@ namespace dpp::events { void entitlement_create::handle(discord_client* client, json &j, const std::string &raw) { if (!client->creator->on_entitlement_create.empty()) { dpp::entitlement ent; - ent.fill_from_json(&j); + json& d = j["d"]; + ent.fill_from_json(&d); dpp::entitlement_create_t entitlement_event(client, raw); entitlement_event.created = ent; diff --git a/src/dpp/events/entitlement_delete.cpp b/src/dpp/events/entitlement_delete.cpp index d1c645faee..79f6f61f34 100644 --- a/src/dpp/events/entitlement_delete.cpp +++ b/src/dpp/events/entitlement_delete.cpp @@ -35,7 +35,8 @@ namespace dpp::events { void entitlement_delete::handle(discord_client* client, json &j, const std::string &raw) { if (!client->creator->on_entitlement_delete.empty()) { dpp::entitlement ent; - ent.fill_from_json(&j); + json& d = j["d"]; + ent.fill_from_json(&d); dpp::entitlement_delete_t entitlement_event(client, raw); entitlement_event.deleted = ent; diff --git a/src/dpp/events/entitlement_update.cpp b/src/dpp/events/entitlement_update.cpp index b4921eb4dc..648a9310d1 100644 --- a/src/dpp/events/entitlement_update.cpp +++ b/src/dpp/events/entitlement_update.cpp @@ -35,7 +35,8 @@ namespace dpp::events { void entitlement_update::handle(discord_client* client, json &j, const std::string &raw) { if (!client->creator->on_entitlement_update.empty()) { dpp::entitlement ent; - ent.fill_from_json(&j); + json& d = j["d"]; + ent.fill_from_json(&d); dpp::entitlement_update_t entitlement_event(client, raw); entitlement_event.updating_entitlement = ent;