https://github.com/realtimechris/bot-template-for-discordcoreapi
A template for a bot, written in C++ using DiscordCoreAPI.
https://github.com/realtimechris/bot-template-for-discordcoreapi
Last synced: about 1 year ago
JSON representation
A template for a bot, written in C++ using DiscordCoreAPI.
- Host: GitHub
- URL: https://github.com/realtimechris/bot-template-for-discordcoreapi
- Owner: RealTimeChris
- License: lgpl-2.1
- Created: 2022-05-12T05:18:01.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-29T12:59:25.000Z (about 2 years ago)
- Last Synced: 2025-03-27T11:19:49.078Z (over 1 year ago)
- Language: CMake
- Size: 33.1 MB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
- License: License.md
Awesome Lists containing this project
README
# Bot-Template-for-DiscordCoreAPI
A template for a bot, written in C++ using DiscordCoreAPI.
## Build Instructions - With VCPKG
----
1. Make sure you've run `vcpkg integrate install`.
2. Set the `VCPKG_ROOT_DIR` in [CMakeLists.txt](https://github.com/RealTimeChris/Bot-Template-for-DiscordCoreAPI/blob/main/CMakeLists.txt#L2) to the root directory of your VCPKG installation, and make sure you've installed DiscordCoreAPI with it - then start up a project in your IDE, set the C++ standard to 20 or newer, and `#include `. Add main.cpp to it.
3. Run in a terminal from within the same folder as the top-level [CMakeLists.txt](https://github.com/RealTimeChris/Bot-Template-for-DiscordCoreAPI/blob/main/CMakeLists.txt), `cmake -S . --preset Windows_OR_Linux_Debug_OR_Release`.
4. Then run `cmake --build --preset Windows_OR_Linux_Debug_OR_Release`.
5. Run within the same terminal and folder `cmake --install ./Build/Debug_OR_Release`. The default installation paths are: Windows = "ROOT_DRIVE:/Users/USERNAME/CMake/Bot-Template-For-DiscordCoreAPI", Linux = "/home/USERNAME/CMake/Bot-Template-For-DiscordCoreAPI", although you can change this by setting CMAKE_INSTALL_PREFIX in CMakeLists.txt.
## Build Instructions - Without VCPKG
1. Build and install the [dependencies](https://github.com/RealTimeChris/DiscordCoreAPI#dependencies).
2. Build and install the [DiscordCoreAPI library](https://github.com/RealTimeChris/DiscordCoreAPI#build-instructions-non-vcpkg---the-library) with CMAKE.
3. Set, in [CMakeLists.txt](https://github.com/RealTimeChris/Bot-Template-for-DiscordCoreAPI/blob/main/CMakeLists.txt#L6-L18), the `_INCLUDE_DIR`, `_DEBUG_ROOT` and `_RELEASE_ROOT` paths to wherever each of the respective dependencies are located - setting the `_DEBUG_ROOT` folder to wherever the debug version of the .lib file is, the `_RELEASE_ROOT` folder to wherever the release version of the .lib file for the library is, and the `_INCLUDE_DIR` to whichever directory contains the public headers for the library.
4. Set, in [CMakeLists.txt](https://github.com/RealTimeChris/Bot-Template-for-DiscordCoreAPI/blob/main/CMakeLists.txt#L4), the `CMAKE_CONFIG_FILE_DIR` to whichever directory contains the DiscordCoreAPIConfig.cmake file that was created by the installation phase of building the library.
5. Run in a terminal from within the same folder as the top-level [CMakeLists.txt](https://github.com/RealTimeChris/Bot-Template-for-DiscordCoreAPI/blob/main/CMakeLists.txt), `cmake -S . --preset Windows_OR_Linux_Debug_OR_Release`.
7. Then run `cmake --build --preset Windows_OR_Linux_Debug_OR_Release`.
8. Run within the same terminal and folder `cmake --install ./Build/Debug_OR_Release`. The default installation paths are: Windows = "ROOT_DRIVE:/Users/USERNAME/CMake/Bot-Template-For-DiscordCoreAPI", Linux = "/home/USERNAME/CMake/Bot-Template-For-DiscordCoreAPI", although you can change this by setting CMAKE_INSTALL_PREFIX in CMakeLists.txt.