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

DiscordCoreClient - The main class for this library. More...

#include <DiscordCoreClient.hpp>

Public Member Functions

 DiscordCoreClient (DiscordCoreClientConfig configData)
 DiscordCoreClient constructor.
BotUser getBotUser ()
 For collecting a copy of the current bot's User.
CommandControllergetCommandController ()
 For collecting a reference to the CommandController.
ConfigManager & getConfigManager ()
 For collecting a reference to the ConfigManager.
EventManagergetEventManager ()
 For collecting a reference to the EventManager.
Milliseconds getTotalUpTime ()
 For collecting, the total time in milliseconds that this bot has been up for.
void registerFunction (const std::vector< std::string > &functionNames, std::unique_ptr< BaseFunction > baseFunction, CreateApplicationCommandData commandData, bool alwaysRegister=false)
 For registering a function with the CommandController.
void runBot ()
 Executes the library, and waits for completion.

Constructor & Destructor Documentation

◆ DiscordCoreClient()

DiscordCoreAPI::DiscordCoreClient::DiscordCoreClient ( DiscordCoreClientConfig  configData)
configDataA DiscordCoreClientConfig structure to select various library options.

Definition at line 125 of file DiscordCoreClient.cpp.

Member Function Documentation

◆ getBotUser()

BotUser DiscordCoreAPI::DiscordCoreClient::getBotUser ( )
BotUser An instance of BotUser.

Definition at line 195 of file DiscordCoreClient.cpp.

Here is the caller graph for this function:

◆ getCommandController()

CommandController & DiscordCoreAPI::DiscordCoreClient::getCommandController ( )
CommandController& A reference to the CommandController.

Definition at line 179 of file DiscordCoreClient.cpp.

◆ getConfigManager()

ConfigManager & DiscordCoreAPI::DiscordCoreClient::getConfigManager ( )
ConfigManager& A reference to the ConfigManager.

Definition at line 183 of file DiscordCoreClient.cpp.

◆ getEventManager()

EventManager & DiscordCoreAPI::DiscordCoreClient::getEventManager ( )
EventManager& A reference to the EventManager.

Definition at line 187 of file DiscordCoreClient.cpp.

◆ getTotalUpTime()

Milliseconds DiscordCoreAPI::DiscordCoreClient::getTotalUpTime ( )
Milliseconds A count, in milliseconds, since the bot has come online.

Definition at line 191 of file DiscordCoreClient.cpp.

◆ registerFunction()

void DiscordCoreAPI::DiscordCoreClient::registerFunction ( const std::vector< std::string > &  functionNames,
std::unique_ptr< BaseFunction baseFunction,
CreateApplicationCommandData  commandData,
bool  alwaysRegister = false 
functionNamesA vector containing the possible names for activating this command/function.
baseFunctionA unique_ptr to the command to be registered.
commandDataA CreateApplicationCommandData structure describing the current function.
alwaysRegisterWhether 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 172 of file DiscordCoreClient.cpp.

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