![]() |
D++ (DPP)
C++ Discord API Bot Library
|
Application command permissions allow you to enable or disable commands for specific users or roles within a guild. More...
#include <appcommand.h>
Inheritance diagram for dpp::command_permission:
Collaboration diagram for dpp::command_permission:Public Member Functions | |
| command_permission ()=default | |
| Construct a new command permission object. More... | |
| command_permission (snowflake id, const command_permission_type t, bool permission) | |
| Construct a new command permission object. More... | |
| virtual | ~command_permission ()=default |
| virtual std::string | build_json (bool with_id=false) const |
| Build JSON string from the object. More... | |
| command_permission & | fill_from_json (nlohmann::json *j) |
| Fill object properties from JSON. More... | |
Public Attributes | |
| snowflake | id |
| the ID of the role or user More... | |
| bool | permission |
| true to allow, false, to disallow More... | |
| command_permission_type | type |
| the type of permission More... | |
Application command permissions allow you to enable or disable commands for specific users or roles within a guild.
|
default |
Construct a new command permission object.
|
virtualdefault |
| 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 |
|
inlinevirtualinherited |
Build JSON string from the object.
| with_id | Include the ID in the JSON |
| command_permission & dpp::command_permission::fill_from_json | ( | nlohmann::json * | j | ) |
Fill object properties from JSON.
| j | JSON to fill from |
| snowflake dpp::command_permission::id |
the ID of the role or user
| bool dpp::command_permission::permission |
true to allow, false, to disallow
| command_permission_type dpp::command_permission::type |
the type of permission