Represents an automod action. More...
#include "automod.h"


Public Member Functions | |
| automod_action () | |
| Construct a new automod action object. More... | |
| virtual | ~automod_action () |
| Destroy the automod action object. More... | |
| template<typename U = T, typename = decltype(std::declval<U&>().to_json_impl(bool{}))> | |
| std::string | build_json (bool with_id=false) const |
| Convert object to json string. More... | |
| template<typename U = T, typename = decltype(std::declval<U&>().fill_from_json_impl(std::declval<nlohmann::json*>()))> | |
| T & | fill_from_json (nlohmann::json *j) |
| Convert object from nlohmann::json. More... | |
| template<typename U = T, typename = decltype(std::declval<U&>().to_json_impl(bool{}))> | |
| auto | to_json (bool with_id=false) const |
| Convert object to nlohmann::json. More... | |
Public Attributes | |
| snowflake | channel_id |
| Channel ID to which user content should be logged, for type dpp::amod_action_send_alert. More... | |
| std::string | custom_message |
| Additional explanation that will be shown to members whenever their message is blocked. More... | |
| uint32_t | duration_seconds |
| Timeout duration in seconds (Maximum of 2419200), for dpp::amod_action_timeout. More... | |
| automod_action_type | type |
| Type of action to take. More... | |
Protected Member Functions | |
| automod_action & | fill_from_json_impl (nlohmann::json *j) |
| Fill object properties from JSON. More... | |
| virtual json | to_json_impl (bool with_id=false) const |
| Build a json for this object. More... | |
Friends | |
| struct | json_interface< automod_action > |
Represents an automod action.
| dpp::automod_action::automod_action | ( | ) |
Construct a new automod action object.
|
virtualdefault |
Destroy the automod action object.
|
inlineinherited |
Convert object to json string.
| with_id | Whether to include the ID or not |
Referenced by dpp::cluster::create_webhook(), dpp::cluster::guild_ban_add(), dpp::cluster::guild_ban_delete(), dpp::cluster::guild_command_edit_permissions(), dpp::cluster::guild_create(), dpp::cluster::guild_get_integrations(), dpp::cluster::guild_get_preview(), dpp::cluster::guild_get_vanity(), and dpp::cluster::roles_get().

|
inlineinherited |
Convert object from nlohmann::json.
| j | nlohmann::json object |
Referenced by dpp::invite::fill_from_json_impl(), dpp::thread::fill_from_json_impl(), dpp::scheduled_event::fill_from_json_impl(), dpp::from_json(), dpp::message::get_url(), and dpp::interaction_response::interaction_response().

|
protected |
Fill object properties from JSON.
| j | JSON to fill from |
References type.
|
inlineinherited |
Convert object to nlohmann::json.
| with_id | Whether to include the ID or not |
Referenced by dpp::cluster::delete_webhook_with_token(), and dpp::onboarding_prompt::onboarding_prompt().

|
protectedvirtual |
Build a json for this object.
|
friend |
| snowflake dpp::automod_action::channel_id |
Channel ID to which user content should be logged, for type dpp::amod_action_send_alert.
| std::string dpp::automod_action::custom_message |
Additional explanation that will be shown to members whenever their message is blocked.
For type dpp::amod_action_block_message
| uint32_t dpp::automod_action::duration_seconds |
Timeout duration in seconds (Maximum of 2419200), for dpp::amod_action_timeout.
| automod_action_type dpp::automod_action::type |
Type of action to take.
Referenced by fill_from_json_impl().