DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
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. More...
 
BotUser getBotUser ()
 For collecting a copy of the current bot's User. More...
 
CommandControllergetCommandController ()
 For collecting a reference to the CommandController. More...
 
EventManagergetEventManager ()
 For collecting a reference to the EventManager. More...
 
void registerFunction (const std::vector< String > &functionNames, std::unique_ptr< BaseFunction > baseFunction, CreateApplicationCommandData commandData, Bool alwaysRegister=false)
 For registering a function with the CommandController. More...
 
void runBot ()
 Executes the library, and waits for completion. More...
 

Constructor & Destructor Documentation

◆ DiscordCoreClient()

DiscordCoreAPI::DiscordCoreClient::DiscordCoreClient ( DiscordCoreClientConfig  configData)

DiscordCoreClient constructor.

Parameters
configDataA DiscordCoreClientConfig structure to select various library options.

Definition at line 131 of file DiscordCoreClient.cpp.

Member Function Documentation

◆ getBotUser()

BotUser DiscordCoreAPI::DiscordCoreClient::getBotUser ( )

For collecting a copy of the current bot's User.

Returns
BotUser An instance of BotUser.

Definition at line 242 of file DiscordCoreClient.cpp.

Here is the caller graph for this function:

◆ getCommandController()

CommandController & DiscordCoreAPI::DiscordCoreClient::getCommandController ( )

For collecting a reference to the CommandController.

Returns
CommandController& A reference to the CommandController.

Definition at line 234 of file DiscordCoreClient.cpp.

◆ getEventManager()

EventManager & DiscordCoreAPI::DiscordCoreClient::getEventManager ( )

For collecting a reference to the EventManager.

Returns
EventManager& A reference to the EventManager.

Definition at line 238 of file DiscordCoreClient.cpp.

◆ registerFunction()

void DiscordCoreAPI::DiscordCoreClient::registerFunction ( const std::vector< String > &  functionNames,
std::unique_ptr< BaseFunction baseFunction,
CreateApplicationCommandData  commandData,
Bool  alwaysRegister = false 
)

For registering a function with the CommandController.

Parameters
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 180 of file DiscordCoreClient.cpp.

◆ runBot()

void DiscordCoreAPI::DiscordCoreClient::runBot ( )

Executes the library, and waits for completion.

Definition at line 246 of file DiscordCoreClient.cpp.


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