DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
discord_core_api::command_controller Class Reference

A class for handling commands from user input. More...

#include <CommandController.hpp>

Public Member Functions

unordered_map< jsonifier::vector< jsonifier::string >, unique_ptr< base_function > > & getFunctions ()
 For returning the contained map of functions. More...
 
void registerFunction (const jsonifier::vector< jsonifier::string > &functionNames, unique_ptr< base_function > baseFunction)
 Registers a function to be called. More...
 

Member Function Documentation

◆ getFunctions()

unordered_map< jsonifier::vector< jsonifier::string >, unique_ptr< base_function > > & discord_core_api::command_controller::getFunctions ( )
Returns
a map containing the function names as well as unique_ptrs to the functions.

Definition at line 42 of file CommandController.cpp.

◆ registerFunction()

void discord_core_api::command_controller::registerFunction ( const jsonifier::vector< jsonifier::string > &  functionNames,
unique_ptr< base_function baseFunction 
)
Parameters
functionNamesa vector of strings to be accepted as function names.
baseFunctiona unique_ptr to the function to be called.

Definition at line 38 of file CommandController.cpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: