| D++ (DPP) C++ Discord API Bot Library

Search
Loading...
Searching...
No Matches
dpp::automod_action Struct Reference

Represents an automod action. More...

`#include <automod.h>`

Inheritance diagram for dpp::automod_action:
[legend]
Collaboration diagram for dpp::automod_action:
[legend]

## Public Member Functions

| automod_action ()
| Construct a new automod action object.
virtual | ~automod_action ()
| Destroy the automod action object.
std::string | build_json (bool with_id=false) const
| Convert object to json string.
automod_action & | fill_from_json (nlohmann::json *j)
| Convert object from nlohmann::json.
auto | to_json (bool with_id=false) const
| Convert object to nlohmann::json.

## Public Attributes

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

## Protected Member Functions

automod_action & | fill_from_json_impl (nlohmann::json *j)
| Fill object properties from JSON.
virtual json | to_json_impl (bool with_id=false) const
| Build a json for this object.

## Friends

struct | json_interface< automod_action >

## Detailed Description

Represents an automod action.

## Constructor & Destructor Documentation

## ◆ automod_action()

dpp::automod_action::automod_action | ( |  | ) |

Construct a new automod action object.

## ◆ ~automod_action()

virtual dpp::automod_action::~automod_action | ( |  | ) |

virtual

Destroy the automod action object.

## Member Function Documentation

## ◆ build_json()

std::string dpp::json_interface< automod_action >::build_json | ( | bool | with_id = false | ) | const

inline inherited

Convert object to json string.

Parameters

  with_id | Whether to include the ID or not

Note
  Some fields are conditionally filled, do not rely on all fields being present

Returns
  std::string Json built from the structure

## ◆ fill_from_json()

automod_action & dpp::json_interface< automod_action >::fill_from_json | ( | nlohmann::json * | j | ) |

inline inherited

Convert object from nlohmann::json.

Parameters

  j | nlohmann::json object

Returns
  T& Reference to self for fluent calling

## ◆ fill_from_json_impl()

automod_action & dpp::automod_action::fill_from_json_impl | ( | nlohmann::json * | j | ) |

protected

Fill object properties from JSON.

Parameters

  j | JSON to fill from

Returns
  automod_action& Reference to self

## ◆ to_json()

auto dpp::json_interface< automod_action >::to_json | ( | bool | with_id = false | ) | const

inline inherited

Convert object to nlohmann::json.

Parameters

  with_id | Whether to include the ID or not

Note
  Some fields are conditionally filled, do not rely on all fields being present

Returns
  json Json built from the structure

## ◆ to_json_impl()

virtual json dpp::automod_action::to_json_impl | ( | bool | with_id = false | ) | const

protected virtual

Build a json for this object.

Returns
  json JSON object

## Friends And Related Symbol Documentation

## ◆ json_interface< automod_action >

friend struct json_interface< automod_action >

friend

## Member Data Documentation

## ◆ channel_id

snowflake dpp::automod_action::channel_id

Channel ID to which user content should be logged, for type dpp::amod_action_send_alert.

## ◆ custom_message

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.

## ◆ duration_seconds

uint32_t dpp::automod_action::duration_seconds

Timeout duration in seconds (Maximum of 2419200), for dpp::amod_action_timeout.

## ◆ type

automod_action_type dpp::automod_action::type

Type of action to take.

D++ Library version 9.0.13 D++ Library version 9.0.12 D++ Library version 9.0.11 D++ Library version 9.0.10 D++ Library version 9.0.9 D++ Library version 9.0.8 D++ Library version 9.0.7 D++ Library version 9.0.6 D++ Library version 9.0.5 D++ Library version 9.0.4 D++ Library version 9.0.3 D++ Library version 9.0.2 D++ Library version 9.0.1 D++ Library version 9.0.0 D++ Library version 1.0.2 D++ Library version 1.0.1 D++ Library version 1.0.0