From b316f8dee3ec6eaadfa4ddc7736440df81fec3cd Mon Sep 17 00:00:00 2001 From: Henonicks Date: Fri, 1 Sep 2023 20:16:21 +0300 Subject: [PATCH] Fixed more stuff that didn't push --- .../the_basics/using_callback_functions.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docpages/example_programs/the_basics/using_callback_functions.md b/docpages/example_programs/the_basics/using_callback_functions.md index 8e9b83dd83..7335bdcbbd 100644 --- a/docpages/example_programs/the_basics/using_callback_functions.md +++ b/docpages/example_programs/the_basics/using_callback_functions.md @@ -5,10 +5,8 @@ When you create or get an object from Discord, you send the request to its API a ~~~~~~~~~~~~~~{.cpp} #include -const std::string BOT_TOKEN = "Token Was Here"; - int main() { - dpp::cluster bot(BOT_TOKEN, dpp::i_default_intents | dpp::i_message_content); + dpp::cluster bot("Token Was Here, dpp::i_default_intents | dpp::i_message_content); /* the second argument is a bitmask of intents - i_message_content is needed to get messages */ bot.on_log(dpp::utility::cout_logger()); @@ -77,13 +75,13 @@ int main() { msgs_get.add_option( dpp::command_option(dpp::co_integer, "quantity", "Quantity of messages to get. Max - 100.") .set_max_value(100) - .set_min_value(0) + .set_min_value(1) ); dpp::slashcommand channel_create("channel-create", "Create a channel", bot.me.id); dpp::slashcommand msg_error("msg-error", "Get an error instead of 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 }); } });