From c50696660f9132d5e35f5e5043a08f1b174646e3 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sat, 4 Nov 2023 17:30:27 +0100 Subject: [PATCH] Created the clear.cpp command --- src/commands/clear.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/commands/clear.cpp diff --git a/src/commands/clear.cpp b/src/commands/clear.cpp new file mode 100644 index 0000000..a47c4f9 --- /dev/null +++ b/src/commands/clear.cpp @@ -0,0 +1,8 @@ +#include "clear.h" +#include "api/util.h" + +void clear::execute(sql::Connection &con, dpp::cluster &bot, const dpp::slashcommand_t &event) { + util::executeQuery(con, "DELETE FROM channels WHERE guildId = ?", {event.command.guild_id.str()}); + + util::sendSuccess(event, "All channels have been unregistered."); +} \ No newline at end of file