MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / main

Function main

docpages/example_code/firstbot3.cpp:5–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3const std::string BOT_TOKEN = "add your token here";
4
5int main() {
6 dpp::cluster bot(BOT_TOKEN);
7
8 bot.on_ready([&bot](const dpp::ready_t& event) {
9 if (dpp::run_once<struct register_bot_commands>()) {
10 bot.global_command_create(dpp::slashcommand("ping", "Ping pong!", bot.me.id));
11 }
12 });
13}

Callers

nothing calls this directly

Calls 1

global_command_createMethod · 0.80

Tested by

no test coverage detected