DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
Login/Instantiation

/// main.cpp-main entry point.
/// https://github.com/RealTimeChris/DiscordCoreAPI
#include <index.hpp>
int main()
{
discord_core_client_config clientConfig{};
clientConfig.botToken = "YOUR_BOT_TOKEN_HERE";
jsonifier::vector<activity_data> activities{};
activity_data activity{};
activity.name = "/help for my commands!";
activity.type = activity_type::game;
activities.pushBack(activity);
clientConfig.presenceData.activities = activities;
clientConfig.presenceData.afk = false;
clientConfig.presenceData.since = 0;
clientConfig.presenceData.status = "online";
auto ptr = makeUnique<discord_core_client>(clientConfig);
}