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

Method commandhandler

src/dpp/commandhandler.cpp:41–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41commandhandler::commandhandler(cluster* o, bool auto_hook_events, snowflake application_id) : slash_commands_enabled(false), owner(o), app_id(application_id)
42{
43 if (!application_id && o->me.id) {
44 app_id = o->me.id;
45 }
46 if (auto_hook_events) {
47 interactions = o->on_slashcommand([this](const dpp::slashcommand_t &event) {
48 this->route(event);
49 });
50 messages = o->on_message_create([this](const dpp::message_create_t & event) {
51 this->route(event);
52 });
53 } else {
54 interactions = messages = 0;
55 }
56
57}
58
59commandhandler& commandhandler::set_owner(cluster* o)
60{

Callers

nothing calls this directly

Calls 1

routeMethod · 0.95

Tested by

no test coverage detected