Skip to content

Commit

Permalink
Merge branch 'dev' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
tarolling authored Jun 12, 2024
2 parents 16830d6 + 3f7bf4b commit fcc6365
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/dpp/events/entitlement_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/dpp/events/entitlement_delete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/dpp/events/entitlement_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fcc6365

Please sign in to comment.