![]() |
D++ (DPP)
C++ Discord API Bot Library
|
Represents an automod rule. More...
#include <automod.h>
Inheritance diagram for dpp::automod_rule:
Collaboration diagram for dpp::automod_rule:Public Member Functions | |
| automod_rule () | |
| Construct a new automod rule object. More... | |
| virtual | ~automod_rule () |
| Destroy the automod rule object. More... | |
| virtual std::string | build_json (bool with_id=false) const |
| Build a json string for this object. More... | |
| automod_rule & | fill_from_json (nlohmann::json *j) |
| Fill object properties from JSON. More... | |
| double | get_creation_time () const |
| Get the creation time of this object according to Discord. More... | |
| bool | operator!= (const managed &other) const noexcept |
| Comparison operator for comparing two managed objects by id. More... | |
| bool | operator== (const managed &other) const noexcept |
| Comparison operator for comparing two managed objects by id. More... | |
Public Attributes | |
| std::vector< automod_action > | actions |
| the actions which will execute when the rule is triggered More... | |
| snowflake | creator_id |
| The user which first created this rule. More... | |
| bool | enabled |
| Whether the rule is enabled. More... | |
| automod_event_type | event_type |
| The rule event type. More... | |
| std::vector< snowflake > | exempt_channels |
| the channel ids that should not be affected by the rule (Maximum of 50) More... | |
| std::vector< snowflake > | exempt_roles |
| the role ids that should not be affected by the rule (Maximum of 20) More... | |
| snowflake | guild_id |
| the guild which this rule belongs to More... | |
| snowflake | id |
| the id of this rule More... | |
| std::string | name |
| the rule name More... | |
| automod_metadata | trigger_metadata |
| The rule trigger metadata. More... | |
| automod_trigger_type | trigger_type |
| The rule trigger type. More... | |
Represents an automod rule.
| dpp::automod_rule::automod_rule | ( | ) |
Construct a new automod rule object.
|
virtual |
Destroy the automod rule object.
|
virtual |
Build a json string for this object.
Reimplemented from dpp::json_interface< automod_rule >.
| automod_rule & dpp::automod_rule::fill_from_json | ( | nlohmann::json * | j | ) |
Fill object properties from JSON.
| j | JSON to fill from |
|
inherited |
Get the creation time of this object according to Discord.
|
noexceptinherited |
Comparison operator for comparing two managed objects by id.
| other | Other object to compare against |
|
noexceptinherited |
Comparison operator for comparing two managed objects by id.
| other | Other object to compare against |
| std::vector<automod_action> dpp::automod_rule::actions |
the actions which will execute when the rule is triggered
| snowflake dpp::automod_rule::creator_id |
The user which first created this rule.
| bool dpp::automod_rule::enabled |
Whether the rule is enabled.
| automod_event_type dpp::automod_rule::event_type |
The rule event type.
| std::vector<snowflake> dpp::automod_rule::exempt_channels |
the channel ids that should not be affected by the rule (Maximum of 50)
| std::vector<snowflake> dpp::automod_rule::exempt_roles |
the role ids that should not be affected by the rule (Maximum of 20)
| snowflake dpp::automod_rule::guild_id |
the guild which this rule belongs to
| snowflake dpp::automod_rule::id |
the id of this rule
| std::string dpp::automod_rule::name |
the rule name
| automod_metadata dpp::automod_rule::trigger_metadata |
The rule trigger metadata.
| automod_trigger_type dpp::automod_rule::trigger_type |
The rule trigger type.