D++ (DPP)
C++ Discord API Bot Library
|
An individual audit log entry. More...
Public Member Functions | |
audit_entry () | |
virtual | ~audit_entry ()=default |
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 | |
snowflake | id |
ID of the entry. More... | |
snowflake | target_id |
std::vector< audit_change > | changes |
Optional: changes made to the target_id. More... | |
snowflake | user_id |
The user or app that made the changes (may be empty). More... | |
audit_type | type |
Type of action that occurred. More... | |
std::optional< audit_extra > | extra |
Optional: additional info for certain action types. More... | |
std::string | reason |
Optional: the reason for the change (1-512 characters). More... | |
Protected Member Functions | |
audit_entry & | fill_from_json_impl (nlohmann::json *j) |
Friends | |
struct | json_interface< audit_entry > |
An individual audit log entry.
dpp::audit_entry::audit_entry | ( | ) |
Constructor
|
virtualdefault |
Destructor
|
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 |
Read class values from json object
j | A json object to read from |
|
inlineinherited |
Convert object to nlohmann::json.
with_id | Whether to include the ID or not |
|
friend |
std::vector<audit_change> dpp::audit_entry::changes |
Optional: changes made to the target_id.
std::optional<audit_extra> dpp::audit_entry::extra |
Optional: additional info for certain action types.
snowflake dpp::audit_entry::id |
ID of the entry.
std::string dpp::audit_entry::reason |
Optional: the reason for the change (1-512 characters).
snowflake dpp::audit_entry::target_id |
ID of the affected entity (webhook, user, role, etc.) (may be empty)
audit_type dpp::audit_entry::type |
Type of action that occurred.
snowflake dpp::audit_entry::user_id |
The user or app that made the changes (may be empty).