- As a result of using the asynchronous agents library, this library has the ability to make fully asynchronous requests to the Discord API.
- Both user messages and user interactions are accepted via the
onInputEventCreationevent. - They can all be responded to using the
InputEventHandler::respondToEvent()function.
if (rolesMsgEmbeds.size() == 0 && itemsMessageEmbeds.size() == 0) {
string msgString = "Sorry, but we are all out of inventory!";
EmbedData messageEmbed;
messageEmbed.setAuthor(args->eventData.getUserName(), args->eventData.getAvatarURL());
messageEmbed.setColor(discordGuild.data.borderColor);
messageEmbed.setDescription(msgString);
messageEmbed.setTimeStamp(getTimeAndDate());
messageEmbed.setTitle("__**Empty Inventory:**__");
if (args->eventData.eventType == InputEventType::REGULAR_MESSAGE) {
ReplyMessageData responseData(args->eventData);
responseData.embeds.push_back(messageEmbed);
InputEventData event01 = InputEventManager::respondToEvent(responseData).get();
InputEventManager::deleteInputEventResponse(event01, 20000).get();
}
else if (args->eventData.eventType == InputEventType::SLASH_COMMAND_INTERACTION) {
CreateInteractionResponseData responseData(args->eventData);
responseData.data.embeds.push_back(messageEmbed);
InputEventData event01 = InputEventManager::respondToEvent(responseData).get();
InputEventManager::deleteInputEventResponse(event01, 20000).get();
}
co_await mainThread;
co_return;
}- Under Solution Properties -> General -> C++ Language Standard, is set to "Preview – Features from the Latest C++ Working Draft (/std:c++latest)".
- Under Solution Properties -> Linker -> System -> Stack Reserver Size is set to 4194304.
-
NOTE: I installed these using the vcpkg installer.
I am currently working on getting this thing to be "useful", and here are some of the things I plan on implementing:
-
Finish adding the base Discord-API data structures, along with classes to utilize/access/change their values.
-
Add a "music-listening" layer with a usable "voice channel" that includes audio encoding/decoding.
-
Build a few bots with the library and document examples.
If you have any suggestions, feel free to let me know, and I will consider taking you up on it. Thanks!

.png?raw=true)