Created the clear.cpp command

This commit is contained in:
Mathias Wagner 2023-11-04 17:30:27 +01:00
parent 46496eb869
commit c50696660f
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

8
src/commands/clear.cpp Normal file
View File

@ -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.");
}