After a while of creating commands, you may start to wonder "hm, how can I clear these?". Well, this tutorial covers it! All you have to do is simply call dpp::cluster::global_bulk_command_delete or dpp::cluster::guild_bulk_command_delete.
- Note
- Clearing global commands will only clear commands that were made globally, same goes for the opposite way round. The example will demonstrate using both functions.
#include <dpp/dpp.h>
int main()
{
if (dpp::run_once<struct clear_bot_commands>()) {
bot.global_bulk_command_delete();
bot.guild_bulk_command_delete(857692897221033129);
}
});
return 0;
}
The cluster class represents a group of shards and a command queue for sending and receiving commands...
Definition: cluster.h:80
std::function< void(const dpp::log_t &)> DPP_EXPORT cout_logger()
Get a default logger that outputs to std::cout. e.g.
@ st_wait
Wait forever on a condition variable. The cluster will spawn threads for each shard and start() will ...
Definition: cluster.h:63
Session ready.
Definition: dispatcher.h:960