summaryrefslogtreecommitdiff
path: root/bot/include/utils.hpp
diff options
context:
space:
mode:
authorsoler_j <soler_j@etna-alternance.net>2025-04-30 01:24:34 +0200
committersoler_j <soler_j@etna-alternance.net>2025-04-30 01:24:34 +0200
commit76b447e1d67389618a027c692f76f937162c5646 (patch)
treee0de726e9c7ee171370a66bfa33422211745732d /bot/include/utils.hpp
parent1d575366a05b93fd7170f851bece8cdd52c4f6db (diff)
Ajout de l'handle des "actions"
- Première action disponible "suppression de message"
Diffstat (limited to 'bot/include/utils.hpp')
-rw-r--r--bot/include/utils.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/bot/include/utils.hpp b/bot/include/utils.hpp
index 57f4005..3052ecf 100644
--- a/bot/include/utils.hpp
+++ b/bot/include/utils.hpp
@@ -57,6 +57,15 @@ namespace app
std::unordered_map<std::string, std::string> generate_key_values(const slashcommand_t &event);
/**
+ * @brief Handles actions specified in the slash command event
+ *
+ * @param event The slash command event
+ * @param actions The JSON object containing actions to be handled
+ * @param key_values The map of key-value pairs to be used in the actions
+ */
+ bool handle_actions(const slashcommand_t &event, const nlohmann::json &actions, const std::unordered_map<std::string, std::string> &key_values, dpp::cluster &bot);
+
+ /**
* @brief Parses a JSON string into a JSON object
*
* @param str The JSON string to parse