Compare commits

..
3 Commits
Author SHA1 Message Date
firewire 686fe4247c 02 - 01 - 02
Build / Build (push) Failing after 34s
2026-09-24 10:34:56 -04:00
firewire 82005881c7 02 - 01 - 01 2026-09-24 10:29:51 -04:00
firewire 5e91d8977d 02 - project structure 2026-09-24 09:32:15 -04:00
46 changed files with 599 additions and 143 deletions
+1 -2
View File
@@ -143,7 +143,7 @@ BreakFunctionDefinitionParameters: false
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
BreakTemplateDeclarations: Yes
ColumnLimit: 80
ColumnLimit: 120
CommentPragmas: "^ IWYU pragma:"
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
@@ -355,4 +355,3 @@ WhitespaceSensitiveMacros:
- STRINGIZE
WrapNamespaceBodyWithEmptyLines: Leave
...
+20
View File
@@ -35,3 +35,23 @@ add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/01_basics/05_webhooks")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/01_basics/06_callbacks")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/01_basics/07_cache")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/01_basics/08_listening_to_messages")
set(CMAKE_FOLDER "02-interactions")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/01_slash_cmds/01_using_slash_cmds")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/01_slash_cmds/02_clearing_registered_cmds")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/01_slash_cmds/03_subcommands")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/01_slash_cmds/04_autocompletion")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/01_slash_cmds/05_file_parameters")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/01_slash_cmds/06_cmd_handler")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/02_ephemeral_replies")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/03_user_apps")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/04_resolved_objects")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/05_msg_components/01_btn")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/05_msg_components/02_advanced_btn")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/05_msg_components/03_select_menu")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/05_msg_components/04_select_menu_advanced")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/05_msg_components/05_editing_msg_from_btn")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/05_msg_components/06_components_v2")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/06_modals")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/07_context_menus")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/02_interactions_and_components/08_thinking")
+1 -3
View File
@@ -11,9 +11,7 @@ int main() {
dotenv::init();
// Make sure the DISCORD_TOKEN was loaded
if (!std::getenv("DISCORD_TOKEN")) {
std::cout
<< "Failed to load the discord token from .env or the environment"
<< std::endl;
std::cout << "Failed to load the discord token from .env or the environment" << std::endl;
exit(EXIT_FAILURE);
}
// Get the bot token
+4 -10
View File
@@ -13,9 +13,7 @@ int main() {
dotenv::init();
// Check to make sure the token was loaded
if (!std::getenv("DISCORD_TOKEN")) {
std::cout
<< "Failed to load the discord token from .env or the environment"
<< std::endl;
std::cout << "Failed to load the discord token from .env or the environment" << std::endl;
exit(EXIT_FAILURE);
}
// Load in the token
@@ -43,8 +41,7 @@ int main() {
// Set the title url
.set_url("https://dpp.dev")
// Set the author info
.set_author("Firewire", "https://dpp.dev",
"https://dpp.dev/DPP-Logo.png")
.set_author("Firewire", "https://dpp.dev", "https://dpp.dev/DPP-Logo.png")
.set_description("Description")
// Set the thumbnail, this is a small image off the right
.set_thumbnail("https://dpp.dev/DPP-Logo.png")
@@ -55,9 +52,7 @@ int main() {
// Set the main image, this will be the center large image
.set_image("https://dpp.dev/DPP-Logo.png")
// Set the footer
.set_footer(dpp::embed_footer()
.set_text("Footer text")
.set_icon("https://dpp.dev/DPP-Logo.png"))
.set_footer(dpp::embed_footer().set_text("Footer text").set_icon("https://dpp.dev/DPP-Logo.png"))
// Add a timestamp,
// time(<arg>) returns a timer of <arg> seconds
// using a 0 for the arg just returns the current time
@@ -77,8 +72,7 @@ int main() {
// on_ready() is called once reconnected.
// We dont want to re-register when this happens)
if (dpp::run_once<struct register_bot_commands>()) {
bot.global_command_create(
dpp::slashcommand("embed", "Send an embed", bot.me.id));
bot.global_command_create(dpp::slashcommand("embed", "Send an embed", bot.me.id));
}
});
+9 -21
View File
@@ -15,9 +15,7 @@ int main() {
dotenv::init();
// Check to make sure the token was loaded
if (!std::getenv("DISCORD_TOKEN")) {
std::cout
<< "Failed to load the discord token from .env or the environment"
<< std::endl;
std::cout << "Failed to load the discord token from .env or the environment" << std::endl;
exit(EXIT_FAILURE);
}
// Load in the token into a string
@@ -61,15 +59,11 @@ int main() {
// Reply back with a message saying the direct message
// failed to send
if (user == event.command.get_issuing_user().id) {
event.reply(
dpp::message("I couldnt send you a message.")
.set_flags(dpp::m_ephemeral));
event.reply(dpp::message("I couldnt send you a message.").set_flags(dpp::m_ephemeral));
} else {
event.reply(
dpp::message(
"I couldnt send a message to that user. "
"Please check that is a valid user.")
.set_flags(dpp::m_ephemeral));
event.reply(dpp::message("I couldnt send a message to that user. "
"Please check that is a valid user.")
.set_flags(dpp::m_ephemeral));
}
return;
}
@@ -77,14 +71,10 @@ int main() {
// In the case the direct message was able to be sent, send
// a confirmation message
if (user == event.command.get_issuing_user().id) {
event.reply(
dpp::message("I've sent you a private message")
.set_flags(dpp::m_ephemeral));
event.reply(dpp::message("I've sent you a private message").set_flags(dpp::m_ephemeral));
} else {
event.reply(
dpp::message(
"I've sent a private message to that user.")
.set_flags(dpp::m_ephemeral));
dpp::message("I've sent a private message to that user.").set_flags(dpp::m_ephemeral));
}
});
}
@@ -94,11 +84,9 @@ int main() {
bot.on_ready([&bot](const dpp::ready_t& event) {
if (dpp::run_once<struct register_bot_commands>()) {
// Create the /pm slashcommand
dpp::slashcommand command("pm", "Send a private message.",
bot.me.id);
dpp::slashcommand command("pm", "Send a private message.", bot.me.id);
// Add the "user" option to the command
command.add_option(dpp::command_option(
dpp::co_mentionable, "user", "The user to message", false));
command.add_option(dpp::command_option(dpp::co_mentionable, "user", "The user to message", false));
// Register the command with discord
bot.global_command_create(command);
}
+10 -21
View File
@@ -15,9 +15,7 @@ int main() {
dotenv::init();
// Make sure the DISCORD_TOKEN was loaded in
if (!std::getenv("DISCORD_TOKEN")) {
std::cout
<< "Failed to load the discord token from .env or the environment"
<< std::endl;
std::cout << "Failed to load the discord token from .env or the environment" << std::endl;
exit(EXIT_FAILURE);
}
// Load in the token
@@ -32,8 +30,7 @@ int main() {
bot.on_slashcommand([&bot](const dpp::slashcommand_t& event) {
if (event.command.get_command_name() == "file") {
// Create the message
dpp::message msg(event.command.channel_id,
"Hey there, I've got a file for you!");
dpp::message msg(event.command.channel_id, "Hey there, I've got a file for you!");
// Add the "README.md" file to the message
msg.add_file("README.md", dpp::utility::read_file("README.md"));
// Send the message
@@ -43,16 +40,13 @@ int main() {
// Handle the external command
if (event.command.get_command_name() == "external") {
bot.request("https://dpp.dev/DPP-Logo.png", dpp::m_get,
[event](const dpp::http_request_completion_t&
httpRequestCompletion) {
[event](const dpp::http_request_completion_t& httpRequestCompletion) {
// Create the message
dpp::message msg(event.command.channel_id,
"Heres an external image!");
dpp::message msg(event.command.channel_id, "Heres an external image!");
// Make sure the http request was completed
if (httpRequestCompletion.status == 200) {
// Add the body of the request to the msg
msg.add_file("logo.png",
httpRequestCompletion.body);
msg.add_file("logo.png", httpRequestCompletion.body);
}
// Send the message
event.reply(msg);
@@ -62,15 +56,13 @@ int main() {
// Handle the embed command
if (event.command.get_command_name() == "embed") {
bot.request("https://dpp.dev/DPP-Logo.png", dpp::m_get,
[event](const dpp::http_request_completion_t&
httpRequestCompletion) {
[event](const dpp::http_request_completion_t& httpRequestCompletion) {
// Create the message
dpp::message msg(event.command.channel_id, "");
// Make sure the http request completed
if (httpRequestCompletion.status == 200) {
// Add the file to the message
msg.add_file("logo.png",
httpRequestCompletion.body);
msg.add_file("logo.png", httpRequestCompletion.body);
// Create the embed
dpp::embed embed;
// Set the image for the embed as the image
@@ -90,18 +82,15 @@ int main() {
// Create and register the file command
// This command will send a copy of the README.md file in the root
// of the project
dpp::slashcommand fileCommand(
"file", "Send a message with a file attached!", bot.me.id);
dpp::slashcommand fileCommand("file", "Send a message with a file attached!", bot.me.id);
bot.global_command_create(fileCommand);
// Create and register the external command
dpp::slashcommand externalCommand(
"external", "Send an image from an external source", bot.me.id);
dpp::slashcommand externalCommand("external", "Send an image from an external source", bot.me.id);
bot.global_command_create(externalCommand);
// Create and register the embed command
dpp::slashcommand embedCommand(
"embed", "Send a message with an image embed", bot.me.id);
dpp::slashcommand embedCommand("embed", "Send a message with an image embed", bot.me.id);
bot.global_command_create(embedCommand);
}
});
+1 -2
View File
@@ -12,8 +12,7 @@ int main() {
// Load in the .env file into the environment
dotenv::init();
if (!std::getenv("DISCORD_WEBHOOK")) {
std::cout << "Failed to get webhook from .env or environment"
<< std::endl;
std::cout << "Failed to get webhook from .env or environment" << std::endl;
exit(EXIT_FAILURE);
}
+38 -54
View File
@@ -19,9 +19,7 @@ int main() {
// Load the .env into the environment
dotenv::init();
if (!std::getenv("DISCORD_TOKEN")) {
std::cout
<< "Failed to get the discord token from the .env or enviroment"
<< std::endl;
std::cout << "Failed to get the discord token from the .env or enviroment" << std::endl;
exit(EXIT_FAILURE);
}
// Get the bot token
@@ -37,57 +35,47 @@ int main() {
if (event.command.get_command_name() == "msgs-get") {
int64_t limit = std::get<int64_t>(event.get_parameter("quantity"));
bot.messages_get(
event.command.channel_id, 0, 0, 0, limit,
[event](const dpp::confirmation_callback_t& callback) {
if (callback.is_error()) {
std::cout << callback.get_error().message << std::endl;
return;
}
bot.messages_get(event.command.channel_id, 0, 0, 0, limit,
[event](const dpp::confirmation_callback_t& callback) {
if (callback.is_error()) {
std::cout << callback.get_error().message << std::endl;
return;
}
auto messages = callback.get<dpp::message_map>();
auto messages = callback.get<dpp::message_map>();
std::string contents;
for (const auto& x : messages) {
contents += x.second.content + "\n";
}
std::string contents;
for (const auto& x : messages) {
contents += x.second.content + "\n";
}
event.reply(contents);
});
event.reply(contents);
});
} else if (event.command.get_command_name() == "channel-create") {
dpp::channel channel = dpp::channel().set_name("test").set_guild_id(
event.command.guild_id);
dpp::channel channel = dpp::channel().set_name("test").set_guild_id(event.command.guild_id);
bot.channel_create(
channel,
[&bot,
event](const dpp::confirmation_callback_t& callback) -> void {
if (callback.is_error()) {
bot.log(dpp::loglevel::ll_error,
callback.get_error().message);
return;
}
bot.channel_create(channel, [&bot, event](const dpp::confirmation_callback_t& callback) -> void {
if (callback.is_error()) {
bot.log(dpp::loglevel::ll_error, callback.get_error().message);
return;
}
auto channel = callback.get<dpp::channel>();
dpp::message message =
dpp::message("The channel's name is '" + channel.name +
"', ID is '" + std::to_string(channel.id) +
"', and the type is '" +
std::to_string(channel.get_type()) + "'.");
event.reply(message);
});
auto channel = callback.get<dpp::channel>();
dpp::message message =
dpp::message("The channel's name is '" + channel.name + "', ID is '" + std::to_string(channel.id) +
"', and the type is '" + std::to_string(channel.get_type()) + "'.");
event.reply(message);
});
} else if (event.command.get_command_name() == "msg-error") {
bot.message_get(
0, 0,
[event](const dpp::confirmation_callback_t& callback) -> void {
if (callback.is_error()) {
event.reply(callback.get_error().message);
return;
}
bot.message_get(0, 0, [event](const dpp::confirmation_callback_t& callback) -> void {
if (callback.is_error()) {
event.reply(callback.get_error().message);
return;
}
auto message = callback.get<dpp::message>();
event.reply(message);
});
auto message = callback.get<dpp::message>();
event.reply(message);
});
}
});
@@ -98,18 +86,14 @@ int main() {
constexpr int64_t max_val{100};
msgs_get.add_option(
dpp::command_option(dpp::co_integer, "quantity",
"Quantity of messages to get. - Max 100")
dpp::command_option(dpp::co_integer, "quantity", "Quantity of messages to get. - Max 100")
.set_min_value(min_val)
.set_max_value(max_val));
dpp::slashcommand channel_create("channel-create",
"Create a channel", bot.me.id);
dpp::slashcommand msg_error(
"msg-error", "Get an error instead of a message", bot.me.id);
dpp::slashcommand channel_create("channel-create", "Create a channel", bot.me.id);
dpp::slashcommand msg_error("msg-error", "Get an error instead of a message", bot.me.id);
bot.global_bulk_command_create(
{msgs_get, channel_create, msg_error});
bot.global_bulk_command_create({msgs_get, channel_create, msg_error});
}
});
+20 -26
View File
@@ -14,8 +14,7 @@ int main() {
dotenv::init();
// Make sure the DISCORD_TOKEN environment var exists
if (!std::getenv("DISCORD_TOKEN")) {
std::cout << "Failed to get DISCORD_TOKEN from .env or the environment."
<< std::endl;
std::cout << "Failed to get DISCORD_TOKEN from .env or the environment." << std::endl;
exit(EXIT_FAILURE);
}
// Get the bot token from DISCORD_TOKEN
@@ -25,31 +24,26 @@ int main() {
dpp::cluster bot(botToken, dpp::i_default_intents | dpp::i_guild_members);
// Create a lamba as a callback for when a reaction is removed
bot.on_message_reaction_remove(
[&bot](const dpp::message_reaction_remove_t& event) {
// Get the user from the cache.
// More then just users are cached, you can use the following
// functions to interact with it
// dpp::find_role()
// dpp::find_channel()
// dpp::find_guild()
// dpp::find_guild_member()
// dpp::find_user()
dpp::user* reacting_user = dpp::find_user(event.reacting_user_id);
bot.on_message_reaction_remove([&bot](const dpp::message_reaction_remove_t& event) {
// Get the user from the cache.
// More then just users are cached, you can use the following
// functions to interact with it
// dpp::find_role()
// dpp::find_channel()
// dpp::find_guild()
// dpp::find_guild_member()
// dpp::find_user()
dpp::user* reacting_user = dpp::find_user(event.reacting_user_id);
// Make sure the user was actually found in the cache
if (!reacting_user) {
bot.log(dpp::ll_info,
"User with id " +
std::to_string(event.reacting_user_id) +
" was not found.");
return;
}
// Log the action, using their username that we grabbed from the
// cache
bot.log(dpp::ll_info, reacting_user->format_username() +
" removed their reaction.");
});
// Make sure the user was actually found in the cache
if (!reacting_user) {
bot.log(dpp::ll_info, "User with id " + std::to_string(event.reacting_user_id) + " was not found.");
return;
}
// Log the action, using their username that we grabbed from the
// cache
bot.log(dpp::ll_info, reacting_user->format_username() + " removed their reaction.");
});
// Start the bot
bot.start(dpp::st_wait);
@@ -18,8 +18,7 @@ int main() {
dotenv::init();
// Make sure the DISCORD_TOKEN env var exists
if (!std::getenv("DISCORD_TOKEN")) {
std::cout << "Failed to get DISCORD_TOKEN from .env or environment"
<< std::endl;
std::cout << "Failed to get DISCORD_TOKEN from .env or environment" << std::endl;
exit(EXIT_FAILURE);
}
// Load in the bot token from the env
@@ -32,8 +31,7 @@ int main() {
bot.on_message_create([](const dpp::message_create_t& event) {
// Filter through the message content
if (event.msg.content.find("bad word") != std::string::npos) {
event.reply("That is not allowed here. Please, mind you language.",
true);
event.reply("That is not allowed here. Please, mind you language.", true);
}
});
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_01_01_using_slash_cmds")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,91 @@
#include <appcommand.h>
#include <cluster.h>
#include <dispatcher.h>
#include <once.h>
#include <cstdlib>
#include <iostream>
#include "dotenv.h"
int main() {
// Load the .env file into the environment
dotenv::init();
// Make sure the DISCORD_TOKEN env var exists
if (!std::getenv("DISCORD_TOKEN") || !std::getenv("DISCORD_GUILD")) {
std::cout << "Failed to get DISCORD_TOKEN or DISCORD_GUILD from .env or environment" << std::endl;
return 0;
}
// Load in the bot token
std::string botToken = std::getenv("DISCORD_TOKEN");
// Load in the guild id
std::string guildId = std::getenv("DISCORD_GUILD");
// Create the bot
dpp::cluster bot(botToken);
// Register a cout logger
bot.on_log(dpp::utility::cout_logger());
// Create a lambda callback for when a slashcommand is run
bot.on_slashcommand([](const dpp::slashcommand_t& event) {
// Filter through the command name and run its matching code
if (event.command.get_command_name() == "blep") {
// Get the "animal" option
std::string animal = std::get<std::string>(event.get_parameter("animal"));
// Reply back
event.reply(std::string("Blep! You chose") + animal);
} else if (event.command.get_command_name() == "blep-guild") {
std::string animal = std::get<std::string>(event.get_parameter("animal"));
event.reply(std::string("Blep! You chose") + animal);
} else if (event.command.get_command_name() == "ping") {
event.reply("Pong!");
} else if (event.command.get_command_name() == "pong") {
event.reply("Ping!");
} else if (event.command.get_command_name() == "ding") {
event.reply("Dong!");
} else if (event.command.get_command_name() == "dong") {
event.reply("Ding!");
}
});
// Create a lambda for when the bot is ready
bot.on_ready([&bot, &guildId](const dpp::ready_t& event) {
// Only run once
if (dpp::run_once<struct register_bot_commands>()) {
// Create the "blep" global command
dpp::slashcommand globalCommand("blep", "Send a random adorable animal photo", bot.me.id);
// Add some options to the global command
globalCommand.add_option(
dpp::command_option(dpp::co_string, "animal", "The type of animal", true)
.add_choice(dpp::command_option_choice("Dog", std::string("animal_dog")))
.add_choice(dpp::command_option_choice("Cat", std::string("animal_cat")))
.add_choice(dpp::command_option_choice("Penguin", std::string("animal_penguin"))));
// Register the global command
bot.global_command_create(globalCommand);
// Create the guild only command
dpp::slashcommand guildCommand("blep-guild", "Send a random adorable animal photo", bot.me.id);
guildCommand.add_option(
dpp::command_option(dpp::co_string, "animal", "The type of animal", true)
.add_choice(dpp::command_option_choice("Dog", std::string("animal_dog")))
.add_choice(dpp::command_option_choice("Cat", std::string("animal_cat")))
.add_choice(dpp::command_option_choice("Penguin", std::string("animal_penguin"))));
// Register the guild command
bot.guild_command_create(guildCommand, guildId);
// Create some commands
dpp::slashcommand pingCommand("ping", "Pong", bot.me.id);
dpp::slashcommand pongCommand("pong", "ping", bot.me.id);
dpp::slashcommand dingCommand("ding", "dong", bot.me.id);
dpp::slashcommand dongCommand("dong", "ding", bot.me.id);
// Bulk register the commands using a list
bot.global_bulk_command_create({pingCommand, pongCommand, dingCommand, dongCommand});
}
});
// Start the bot
bot.start(dpp::st_wait);
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_01_02_clearing_registered_cmds")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,37 @@
#include <cluster.h>
#include <dispatcher.h>
#include <dotenv.h>
#include <exception.h>
#include <iostream>
int main() {
// Load the .env file into the environment
dotenv::init();
// Make sure the DISCORD_TOKEN env var exists
if (!std::getenv("DISCORD_TOKEN") || !std::getenv("DISCORD_GUILD")) {
std::cout << "Failed to get DISCORD_TOKEN or DISCORD_GUILD from .env or environment" << std::endl;
return 0;
}
// Load in the bot token
std::string botToken = std::getenv("DISCORD_TOKEN");
// Load in the guild id
std::string guildId = std::getenv("DISCORD_GUILD");
// Create the bot
dpp::cluster bot(botToken);
// Register a cout_logger
bot.on_log(dpp::utility::cout_logger());
// Create a lambda to be called when the bot is ready
bot.on_ready([&bot, &guildId](const dpp::ready_t& event) {
// Bulk delete any globally registered commands
bot.global_bulk_command_delete();
// Bulk delete any guild commands registered to the passed in guild id
bot.guild_bulk_command_delete(guildId);
});
// Start the bot
bot.start(dpp::st_wait);
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_01_03_subcommands")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_01_04_autocompletion")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_01_05_file_parameters")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_01_06_cmd_handler")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_02_emphemeral_replies")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_01_user_apps")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_04_resolved_objects")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_05_01_btn")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_05_02_advanced_btn")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_05_03_select_menu")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_05_04_select_menu_advanced")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_05_05_editing_msg_from_btn")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_05_06_components_v2")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_06_modals")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_07_context_menus")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}
@@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.28)
project(dppbots)
set(example_name "02_08_thinking")
message("Setting up ${example_name}")
add_executable(${example_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
target_include_directories(${example_name} PUBLIC
"${dpp_SOURCE_DIR}/include"
"${dotenv-cpp_SOURCE_DIR}/include/laserpants"
)
target_link_libraries(${example_name}
dpp
dotenv
)
SET_OUTPUT_NAMES(${example_name})
@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "WIP" << std::endl;
return 0;
}