Skip to content

Commit

Permalink
feat: add interaction::app_permissions - discord/discord-api-docs#5131
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis committed Jun 29, 2022
1 parent c858cb8 commit 4eacb0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/dpp/appcommand.h
Expand Up @@ -625,6 +625,7 @@ class DPP_EXPORT interaction : public managed, public json_interface<interaction
snowflake guild_id; //!< Optional: the guild it was sent from
snowflake channel_id; //!< Optional: the channel it was sent from
snowflake message_id; //!< Originating message id for context menu actions
permission app_permissions; //!< Permissions of the bot in the channel/guild where this command was issued
message msg; //!< Originating message for context menu actions
guild_member member; //!< Optional: guild member data for the invoking user, including permissions
user usr; //!< Optional: user object for the invoking user, if invoked in a DM
Expand Down
1 change: 1 addition & 0 deletions src/dpp/slashcommand.cpp
Expand Up @@ -550,6 +550,7 @@ void from_json(const nlohmann::json& j, interaction& i) {
i.application_id = snowflake_not_null(&j, "application_id");
i.channel_id = snowflake_not_null(&j, "channel_id");
i.guild_id = snowflake_not_null(&j, "guild_id");
i.app_permissions = snowflake_not_null(&j, "app_permissions");

if (j.find("message") != j.end()) {
const json& m = j["message"];
Expand Down

0 comments on commit 4eacb0c

Please sign in to comment.