![]() |
DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
|
discord_core_client - the main class for this library. More...
#include <DiscordCoreClient.hpp>
Public Member Functions | |
discord_core_client (const discord_core_client_config &configData) | |
discord_core_client constructor. More... | |
command_controller & | getCommandController () |
For collecting a reference to the command_controller. More... | |
const config_manager & | getConfigManager () const |
For collecting a reference to the config_manager. More... | |
event_manager & | getEventManager () |
For collecting a reference to the event_manager. More... | |
milliseconds | getTotalUpTime () |
For collecting, the total time in milliseconds that this bot has been up for. More... | |
void | registerFunction (const jsonifier::vector< jsonifier::string > &functionNames, unique_ptr< base_function > baseFunction, create_application_command_data commandData, bool alwaysRegister=false) |
For registering a function with the command_controller. More... | |
void | runBot () |
Executes the library, and waits for completion. | |
Static Public Member Functions | |
static bot_user | getBotUser () |
For collecting a copy of the current bot's user_data. More... | |
discord_core_api::discord_core_client::discord_core_client | ( | const discord_core_client_config & | configData | ) |
configData | a discord_core_client_config structure to select various library options. |
Definition at line 113 of file DiscordCoreClient.cpp.
|
static |
command_controller & discord_core_api::discord_core_client::getCommandController | ( | ) |
Definition at line 182 of file DiscordCoreClient.cpp.
const config_manager & discord_core_api::discord_core_client::getConfigManager | ( | ) | const |
Definition at line 149 of file DiscordCoreClient.cpp.
event_manager & discord_core_api::discord_core_client::getEventManager | ( | ) |
Definition at line 186 of file DiscordCoreClient.cpp.
milliseconds discord_core_api::discord_core_client::getTotalUpTime | ( | ) |
Definition at line 190 of file DiscordCoreClient.cpp.
void discord_core_api::discord_core_client::registerFunction | ( | const jsonifier::vector< jsonifier::string > & | functionNames, |
unique_ptr< base_function > | baseFunction, | ||
create_application_command_data | commandData, | ||
bool | alwaysRegister = false |
||
) |
functionNames | a vector containing the possible names for activating this command/function. |
baseFunction | a unique_ptr to the command to be registered. |
commandData | a create_application_command_data structure describing the current function. |
alwaysRegister | whether or not it gets registered every time the bot boots up, or only when it's missing from the bot's list of registered commands. |
Definition at line 175 of file DiscordCoreClient.cpp.