dpp::command_permission
dpp::json_interface< command_permission >
appcommand.h
struct friend struct json_interface< command_permission > json_interface< command_permission > dpp::command_permission::json_interface< command_permission > json_interface< command_permission >
snowflake snowflake dpp::command_permission::id id dpp::command_permission::id

The ID of the role/user.

bool bool dpp::command_permission::permission permission dpp::command_permission::permission

True to allow, false to disallow.

command_permission_type command_permission_type dpp::command_permission::type type dpp::command_permission::type

The type of permission.

command_permission & command_permission & dpp::command_permission::fill_from_json_impl (nlohmann::json *j) fill_from_json_impl dpp::command_permission::fill_from_json_impl nlohmann::json * j

Fill object properties from JSON.

j

JSON to fill from

command_permission& Reference to self

dpp::command_permission::command_permission
()=default
command_permission
dpp::command_permission::command_permission

Construct a new command permission object.

dpp::command_permission::command_permission
(snowflake id, const command_permission_type t, bool permission)
command_permission
dpp::command_permission::command_permission
snowflake id
const command_permission_type t
bool permission

Construct a new command permission object.

id

The ID of the role or user

t

The permission type

permission

True to allow, false, to disallow

virtual dpp::command_permission::~command_permission
()=default
~command_permission
dpp::command_permission::~command_permission
std::string std::string dpp::json_interface< command_permission >::build_json (bool with_id=false) const build_json dpp::json_interface< command_permission >::build_json bool with_id false

Convert object to json string.

with_id

Whether to include the ID or not

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

std::string Json built from the structure

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

Convert object from nlohmann::json.

j

nlohmann::json object

T& Reference to self for fluent calling

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

Convert object to nlohmann::json.

with_id

Whether to include the ID or not

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

json Json built from the structure

Application command permissions allow you to enable or disable commands for specific users or roles within a guild.

dpp::command_permission
dpp::json_interface< T >
dpp::json_interface< command_permission >
< command_permission >
bool
command_permission_type
dpp::command_permission
id
type
permission
dpp::json_interface< T >
dpp::json_interface< command_permission >
< command_permission >
dpp::snowflake
value
uint64_t
- dpp::command_permission
  build_json
- dpp::command_permission
  command_permission
- dpp::command_permission
  command_permission
- dpp::command_permission
  fill_from_json
- dpp::command_permission
  fill_from_json_impl
- dpp::command_permission
  id
- dpp::command_permission
  json_interface< command_permission >
- dpp::command_permission
  permission
- dpp::command_permission
  to_json
- dpp::command_permission
  type
- dpp::command_permission
  ~command_permission