diff --git a/buildtools/make_vcpkg.php b/buildtools/make_vcpkg.php index dc2c05ab57..8fe1ad7154 100755 --- a/buildtools/make_vcpkg.php +++ b/buildtools/make_vcpkg.php @@ -42,7 +42,7 @@ $vcpkg->constructPortAndVersionFile() ); if (!empty($sha512)) { - /* now check out master */ + /* Now check out master */ if (!$vcpkg->checkoutRepository()) { exit(1); } diff --git a/docpages/advanced_reference/automating-with-jenkins.md b/docpages/advanced_reference/automating-with-jenkins.md index 96736f08f4..ba7f3ef980 100644 --- a/docpages/advanced_reference/automating-with-jenkins.md +++ b/docpages/advanced_reference/automating-with-jenkins.md @@ -49,7 +49,7 @@ Making sure you have your project files in the workspace directory (you can see Running the builds is the same as any other time, but we'll still cover it! However, we won't cover running it in background and whatnot, that part is completely down to you. -First, you need to get into the `jenkins` user. If you're like me and don't have the Jenkins user password, you can login with your normal login (that has sudo perms) and do `sudo su - jenkins`. Once logged in, you'll be in `/var/lib/jenkins/`. From here, you'll want to do `cd workspace/DiscordBot/` (make sure to replace "DiscordBot" with your bot's name. Remember, you can tab-complete this) and then `cd build`. now, you can simply do `./DiscordBot`! +First, you need to get into the `jenkins` user. If you're like me and don't have the Jenkins user password, you can login with your normal login (that has sudo perms) and do `sudo su - jenkins`. Once logged in, you'll be in `/var/lib/jenkins/`. From here, you'll want to do `cd workspace/DiscordBot/` (make sure to replace "DiscordBot" with your bot's name. Remember, you can tab-complete this) and then `cd build`. Now, you can simply do `./DiscordBot`! \warning If you are going to be running the bot at the same time as builds, I would heavily advise that you copy the bot (if it's not statically linked, then copy the entire build directory) to a different location. This is so you can pick and choose when the bot gets updated (and even means you can run experimental builds as opposed to stable builds) but also means you avoid any risk of the bot crashing during build (as Jenkins will be overwriting your executable and libraries). diff --git a/docpages/advanced_reference/lambdas_and_locals.md b/docpages/advanced_reference/lambdas_and_locals.md index e98af18418..ad895e28b6 100644 --- a/docpages/advanced_reference/lambdas_and_locals.md +++ b/docpages/advanced_reference/lambdas_and_locals.md @@ -8,7 +8,7 @@ It is important to remember that when you put a lambda callback onto a function To explain this situation and how it causes issues, I'd like you to imagine the age-old magic trick, where a magician sets a fine table full of cutlery, pots, pans and wine. He indicates to the audience that this is authentic, then with a whip of his wrist, he whips the tablecloth away, leaving the cutlery and other tableware in place (if he is any good as a magician!) -now imagine the following code scenario. We will describe this code scenario as the magic trick above, in the steps below: +Now imagine the following code scenario. We will describe this code scenario as the magic trick above, in the steps below: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~cpp bot.on_message_create([&bot](const dpp::message_create_t & event) { diff --git a/docpages/advanced_reference/separate-events.md b/docpages/advanced_reference/separate-events.md index eb77cb0bf8..770ffc8862 100644 --- a/docpages/advanced_reference/separate-events.md +++ b/docpages/advanced_reference/separate-events.md @@ -74,4 +74,4 @@ int main() { And there we go! How tidy is that? -now, the possibilities to this are not limited. If you wish to do this twice (as I explained at first), you can simply have another class and just copy the `bot.on_message_create` line below in the `main.cpp` file and then you can change it to reference the second class, meaning you have two message events firing in two separate classes! +Now, the possibilities to this are not limited. If you wish to do this twice (as I explained at first), you can simply have another class and just copy the `bot.on_message_create` line below in the `main.cpp` file and then you can change it to reference the second class, meaning you have two message events firing in two separate classes! diff --git a/docpages/example_programs/misc/making_threads.md b/docpages/example_programs/misc/making_threads.md index 8f2f554ca9..c34dfab88c 100644 --- a/docpages/example_programs/misc/making_threads.md +++ b/docpages/example_programs/misc/making_threads.md @@ -26,7 +26,7 @@ After that, you'll be able to see your bot send a message in your thread! Those of you who are familar with sending messages in regular channels may have also noticed that sending messages to threads is the same as sending a general message. This is because threads are basically channels with a couple more features! -now, we're going to cover how to lock a thread! With this, you'll also learn how to edit threads in general, meaning you can go forward and learn how to change even more stuff about threads, as much as your heart desires! +Now, we're going to cover how to lock a thread! With this, you'll also learn how to edit threads in general, meaning you can go forward and learn how to change even more stuff about threads, as much as your heart desires! \include{cpp} making_threads3.cpp diff --git a/docpages/example_programs/misc/setting_status.md b/docpages/example_programs/misc/setting_status.md index 4cf091d19f..16796887b5 100644 --- a/docpages/example_programs/misc/setting_status.md +++ b/docpages/example_programs/misc/setting_status.md @@ -15,7 +15,7 @@ If all went well, your bot should now be online and say this on members list! If you want to make your bot show as Do Not Disturb, then you could change dpp::ps_online to dpp::ps_dnd. You can also play around with dpp::at_game, changing it to something like dpp::at_custom or dpp::at_listening! -now, let's cover setting the bot status to say `Playing with x guilds!` every two minutes. +Now, let's cover setting the bot status to say `Playing with x guilds!` every two minutes. \note This example uses timers to update the status every 2 minutes. If you aren't familiar with D++'s own timers, please read \ref using_timers "this page on timers" before you continue. diff --git a/docpages/example_programs/misc/using-emojis.md b/docpages/example_programs/misc/using-emojis.md index 1a48e69533..545e6056a0 100644 --- a/docpages/example_programs/misc/using-emojis.md +++ b/docpages/example_programs/misc/using-emojis.md @@ -8,7 +8,7 @@ First - Sending emojis. You have to use its mention, which depends on the type. \include{cpp} using_emojis1.cpp -now, our bot will send our epic emojis! +Now, our bot will send our epic emojis! \image html using_emojis1.png diff --git a/docpages/example_programs/the_basics/editing-channels-and-messages.md b/docpages/example_programs/the_basics/editing-channels-and-messages.md index 26f6a4ef2f..900a577d76 100644 --- a/docpages/example_programs/the_basics/editing-channels-and-messages.md +++ b/docpages/example_programs/the_basics/editing-channels-and-messages.md @@ -33,7 +33,7 @@ After editing the channel: \image html stuff_edit4.png ## Editing embeds -now let's send an embed and edit it. If a message has one `content` field, it can have a few `embed` fields, up to 10 to be precise. So we first get the embed we want and edit and change its description. +Now let's send an embed and edit it. If a message has one `content` field, it can have a few `embed` fields, up to 10 to be precise. So we first get the embed we want and edit and change its description. \include{cpp} editing_messages3.cpp diff --git a/docpages/example_programs/the_basics/using_callback_functions.md b/docpages/example_programs/the_basics/using_callback_functions.md index bdbb3ca989..587be849f9 100644 --- a/docpages/example_programs/the_basics/using_callback_functions.md +++ b/docpages/example_programs/the_basics/using_callback_functions.md @@ -1,6 +1,6 @@ \page callback-functions Using Callback Functions -When you create or get an object from Discord, you send the request to its API and in return you get either an error or the object you requested/created. You can pass a function to API calls as the callback function. This means that when the request completes, and you get a response from the API, your callback function executes. You must be careful with lambda captures! Good practice would be not capturing variables by reference unless you have to, since when the request completes and the function executes, the variables can already be destructed. Advanced reference can be found [here](https://dpp.dev/lambdas-and-locals.html). now, let's see callback functions in action: +When you create or get an object from Discord, you send the request to its API and in return you get either an error or the object you requested/created. You can pass a function to API calls as the callback function. This means that when the request completes, and you get a response from the API, your callback function executes. You must be careful with lambda captures! Good practice would be not capturing variables by reference unless you have to, since when the request completes and the function executes, the variables can already be destructed. Advanced reference can be found [here](https://dpp.dev/lambdas-and-locals.html). Now, let's see callback functions in action: \include{cpp} callbacks.cpp diff --git a/docpages/install/install-windows-vs-zip.md b/docpages/install/install-windows-vs-zip.md index 5ef00a8e24..19d7fc3917 100644 --- a/docpages/install/install-windows-vs-zip.md +++ b/docpages/install/install-windows-vs-zip.md @@ -39,7 +39,7 @@ To add D++ to a Visual Studio project, using **Visual Studio 2019** or **Visual 12. Again within the same window, go to the input section, under the linker category, and add '**dpp.lib;**' to the start of the libraries to include, as shown below: \image html zip_vsproj_11.png -13. now you can paste some code into the editor, completely replacing the 'hello world' application that Visual Studio made for you. The example code here is the basic bot from the first example on this site. You should at this point also double check that the architecture you have selected (in this case x86) matches the version of the dll/lib files you downloaded from the website. This is **important** as if you mismatch them the compilation will just fail. +13. Now you can paste some code into the editor, completely replacing the 'hello world' application that Visual Studio made for you. The example code here is the basic bot from the first example on this site. You should at this point also double check that the architecture you have selected (in this case x86) matches the version of the dll/lib files you downloaded from the website. This is **important** as if you mismatch them the compilation will just fail. \image html zip_vsproj_12.png 14. Go to the build menu and choose Build Solution (A handy shortcut for this is to just press **F7**): diff --git a/docpages/make_a_bot/cmake.md b/docpages/make_a_bot/cmake.md index b758046547..c96d8275d0 100644 --- a/docpages/make_a_bot/cmake.md +++ b/docpages/make_a_bot/cmake.md @@ -120,7 +120,7 @@ find_package_handle_standard_args(DPP DEFAULT_MSG DPP_LIBRARIES DPP_INCLUDE_DIR) ## 4. Build the bot. -now that we have our all our cmake stuff setup and we've got our code in place, we can initalise CMake. You'll want to go inside the `build/` directory and do `cmake ..`. +Now that we have our all our cmake stuff setup and we've got our code in place, we can initalise CMake. You'll want to go inside the `build/` directory and do `cmake ..`. Once that's completed, you'll want to head back to your up-most folder (where all the folders are for your bot) and run `cmake --build build/ -j4` (replace -j4 with however many threads you want to use). This will start compiling your bot and creating the executable. diff --git a/docpages/make_a_bot/meson.md b/docpages/make_a_bot/meson.md index a7c1ca1d00..29b93a1afc 100644 --- a/docpages/make_a_bot/meson.md +++ b/docpages/make_a_bot/meson.md @@ -61,6 +61,6 @@ meson setup builddir meson compile -C builddir ``` -now, your Meson project should be all setup! +Now, your Meson project should be all setup! **Have fun!** diff --git a/docpages/make_a_bot/replit.md b/docpages/make_a_bot/replit.md index 0e25499de5..feb0e7ea82 100644 --- a/docpages/make_a_bot/replit.md +++ b/docpages/make_a_bot/replit.md @@ -20,7 +20,7 @@ g++ -o bot main.cpp -ldpp -lpthread -L./usr/lib -I./usr/include -std=c++17 LD_PRELOAD=./usr/lib/libdpp.so ./bot ``` -now that your bot is running, you have to keep it online. Replit automatically puts repls to sleep after some time, so you will need to ping a webserver. Unfortunately, Replit is sometimes limiting, and this is one of the only free workarounds to this issue. +Now that your bot is running, you have to keep it online. Replit automatically puts repls to sleep after some time, so you will need to ping a webserver. Unfortunately, Replit is sometimes limiting, and this is one of the only free workarounds to this issue. 1. Start a http server. This can be through any webserver, but as a simple solution, use python's built in http.server: ```bash diff --git a/docpages/make_a_bot/windows_wsl.md b/docpages/make_a_bot/windows_wsl.md index c0b23183f3..455073bb20 100644 --- a/docpages/make_a_bot/windows_wsl.md +++ b/docpages/make_a_bot/windows_wsl.md @@ -12,7 +12,7 @@ This tutorial teaches you how to create a lightweight environment for D++ develo 6. Congratulations, you've successfully installed all dependencies! Now comes the real fun: Setting up the environment! For this tutorial we'll use a as small as possible setup, so you might create a more advanced one for production bots. 7. Create a new directory, inside your home directory, using `mkdir MyBot`. Then, you want to open that directory using `cd MyBot`. 8. Now that you've a directory to work in, type `touch mybot.cxx` to create a file you can work in! -9. now, head on over to Visual Studio Code. Press `CTRL+SHIFT+P` and type `Remote-WSL: New WSL Window` (You don't have to type all of it, it will auto-suggest it!). This will bring up a new window. In the new window, choose `open folder` and choose the directory you've created prior (It should be within your home directory). Press OK and now you have your Folder opened as a Workspace! +9. Now, head on over to Visual Studio Code. Press `CTRL+SHIFT+P` and type `Remote-WSL: New WSL Window` (You don't have to type all of it, it will auto-suggest it!). This will bring up a new window. In the new window, choose `open folder` and choose the directory you've created prior (It should be within your home directory). Press OK and now you have your Folder opened as a Workspace! 10. Add code to your CXX file (We suggest using the \ref firstbot "first bot page" if this is your first time!) and compile it by running `g++ -std=c++17 *.cxx -o bot -ldpp` in the same folder as your cxx file. This will create a "bot" file! 11. You can now start your bot by typing `./bot`! diff --git a/doxygen-awesome-css b/doxygen-awesome-css index 568f56cde6..4593c19803 160000 --- a/doxygen-awesome-css +++ b/doxygen-awesome-css @@ -1 +1 @@ -Subproject commit 568f56cde6ac78b6dfcc14acd380b2e745c301ea +Subproject commit 4593c198030b6e5019aae4d9c2eeb7497f02dbf8