DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
Getting Guild Application Commands

/// Test.hpp-Header for the "test" command.
/// https://github.com/RealTimeChris/DiscordCoreAPI
#pragma once
#include "Index.hpp"
namespace DiscordCoreAPI {
class Test : public DiscordCoreAPI::BaseFunction {
public:
Test() {
this->commandName = "test";
this->helpDescription = "Testing purposes!";
msgEmbed.setDescription("------\nSimply enter !test or /test!\n------");
msgEmbed.setTitle("__**Test Usage:**__");
msgEmbed.setTimeStamp(getTimeAndDate());
msgEmbed.setColor("FeFeFe");
this->helpEmbed = msgEmbed;
}
std::unique_ptr<DiscordCoreAPI::BaseFunction> create() {
return std::make_unique<Test>();
}
virtual void execute(DiscordCoreAPI::BaseFunctionArguments& args) {
dataPackage.guildId = args.eventData.getGuildId();
for (auto value: returnVector) {
cout << value.name << endl;
}
}
};
}
The main namespace for this library.
For acquiring all of the Guild ApplicationCommands of a single Guild.
Snowflake guildId
The id of the Guild for which you would like to acquire the ApplicationCommands from.
static CoRoutine< std::vector< ApplicationCommand > > getGuildApplicationCommandsAsync(GetGuildApplicationCommandsData dataPackage)
Get all of the Guild ApplicationCommands for a single Guild for this bot.
void get()
Gets the resulting value of the CoRoutine.
Definition: CoRoutine.hpp:312
EmbedData & setTitle(const std::string &titleNew)
Sets the title of the embed.
EmbedData & setDescription(const std::string &descriptionNew)
Sets the description (the main contents) of the embed.
EmbedData & setColor(const std::string &hexColorValueNew)
Sets the color of the embed, by applying a hex-color value.
EmbedData & setTimeStamp(const std::string &timeStamp)
Sets the timeStamp on the embed.
Base arguments for the command classes.
Base class for the command classes.
static CoRoutine< void > deleteInputEventResponseAsync(InputEventData &dataPackage, int32_t timeDelayNew=0)
Deletes a previously sent "input-event-response".