D++ is offered as a C++ module, which offers improved compile times over a traditional header.
In order to enable support, you must use C++20 (or later) with any module-supporting compiler. To activate the feature, pass the DPP_MODULES flag to CMake. Ensure that the generated build system supports modules (for CMake, this is usually Ninja; note CMake does not currently support modules with Makefile).
Once this is done, simply import dpp; and we're good to go!
#include <string>
#include <typeinfo>
int main() {
event.reply("Pong!");
}
});
bot.global_command_create(
);
}
});
return 0;
}
The cluster class represents a group of shards and a command queue for sending and receiving commands...
Definition cluster.h:89
std::string get_command_name() const
Get the command name for a command interaction.
Represents an application command, created by your bot either globally, or on a guild.
Definition appcommand.h:1436
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
interaction command
command interaction
Definition dispatcher.h:789
Session ready.
Definition dispatcher.h:1072
User has issued a slash command.
Definition dispatcher.h:806