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() {
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:89
std::function< void(const dpp::log_t &)> DPP_EXPORT cout_logger()
Get a default logger that outputs to std::cout. e.g.
auto run_once()
Run some code within an if() statement only once.
Definition once.h:41
@ st_wait
Wait forever on a condition variable. The cluster will spawn threads for each shard and start() will ...
Definition cluster.h:72
Session ready.
Definition dispatcher.h:1072