D++ (DPP)
C++ Discord API Bot Library
|
Represents an automod action. More...
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&>().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... | |
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... | |
Public Attributes | |
automod_action_type | type |
Type of action to take. More... | |
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. For type dpp::amod_action_block_message. More... | |
uint32_t | duration_seconds |
Timeout duration in seconds (Maximum of 2419200), for dpp::amod_action_timeout. 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.
|
virtual |
Destroy the automod action object.
|
inlineinherited |
Convert object to json string.
with_id | Whether to include the ID or not |
|
inlineinherited |
Convert object from nlohmann::json.
j | nlohmann::json object |
|
protected |
Fill object properties from JSON.
j | JSON to fill from |
|
inlineinherited |
Convert object to nlohmann::json.
with_id | Whether to include the ID or not |
|
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.