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

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

#include <CommandController.hpp>

Public Member Functions

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

Member Function Documentation

◆ getFunctions()

std::map< std::vector< std::string >, std::unique_ptr< BaseFunction > > & DiscordCoreAPI::CommandController::getFunctions ( )

For returning the contained map of functions.

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 DiscordCoreAPI::CommandController::registerFunction ( const std::vector< std::string > &  functionNames,
std::unique_ptr< BaseFunction baseFunction 
)

Registers a function to be called.

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.


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