Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make modals work again by making to_json_impl and fill_from_json virtual #950

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/dpp/appcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,14 @@ struct DPP_EXPORT interaction_response : public json_interface<interaction_respo
* @param j JSON to fill from
* @return interaction_response& Reference to self
*/
interaction_response& fill_from_json_impl(nlohmann::json* j);
virtual interaction_response& fill_from_json_impl(nlohmann::json* j);

/**
* @brief Build json for this object
*
* @return json JSON object
*/
json to_json_impl(bool with_id = false) const;
virtual json to_json_impl(bool with_id = false) const;

public:
/**
Expand Down Expand Up @@ -415,15 +415,15 @@ struct DPP_EXPORT interaction_modal_response : public interaction_response, publ
* @param j JSON to fill from
* @return interaction_response& Reference to self
*/
interaction_modal_response& fill_from_json_impl(nlohmann::json* j);
virtual interaction_modal_response& fill_from_json_impl(nlohmann::json* j);

/**
* @brief Build a json for this object
* @param with_id include id in json output
*
* @return json JSON object
*/
json to_json_impl(bool with_id = false) const;
virtual json to_json_impl(bool with_id = false) const;

public:
/**
Expand Down