aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bot.cpp7
-rw-r--r--src/main.cpp2
-rw-r--r--src/modules.cpp10
3 files changed, 19 insertions, 0 deletions
diff --git a/src/bot.cpp b/src/bot.cpp
index 8c3a84c..d3bd6b7 100644
--- a/src/bot.cpp
+++ b/src/bot.cpp
@@ -346,3 +346,10 @@ void Bot::onWebhooksUpdate(const dpp::webhooks_update_t &obj)
}
+void Bot::onSlashCommand(const dpp::slashcommand_t &event) {
+ FOREACH_MOD(I_OnSlashCommand, OnSlashCommand(event));
+}
+
+void Bot::onFormSubmit(const dpp::form_submit_t &event) {
+ FOREACH_MOD(I_OnFormSubmit, OnFormSubmit(event));
+} \ No newline at end of file
diff --git a/src/main.cpp b/src/main.cpp
index e6d7c13..6ce5858 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -82,6 +82,8 @@ int main(int argc, char const *argv[]) {
bot.on_message_create(std::bind(&Bot::onMessage, &client, std::placeholders::_1));
bot.on_ready(std::bind(&Bot::onReady, &client, std::placeholders::_1));
bot.on_message_reaction_add(std::bind(&Bot::onMessageReactionAdd, &client, std::placeholders::_1));
+ bot.on_slashcommand(std::bind(&Bot::onSlashCommand, &client, std::placeholders::_1));
+ bot.on_form_submit(std::bind(&Bot::onFormSubmit, &client, std::placeholders::_1));
bot.start(dpp::st_wait);
sentry_close();
diff --git a/src/modules.cpp b/src/modules.cpp
index e784c0c..62cc70e 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -48,6 +48,8 @@ const char* StringNames[I_END + 1] = {
"I_OnVoiceServerUpdate",
"I_OnWebhooksUpdate",
"I_OnCommand",
+ "I_OnSlashCommand",
+ "I_OnFormSubmit",
"I_END"
};
@@ -437,6 +439,14 @@ bool Module::OnCommand(const dpp::message_create_t &message, const std::string &
return true;
}
+bool Module::OnSlashCommand(const dpp::slashcommand_t &event) {
+ return true;
+}
+
+bool Module::OnFormSubmit(const dpp::form_submit_t &event) {
+ return true;
+}
+
bool Module::OnAllShardsReady()
{
return true;