CMake template for a simple D++ bot. This template assumes that D++ is already installed.
- Edit /src/main.cpp : replace <your_bot_token> with your bot token
const std::string bot_token = "<your_bot_token>";- Run the following codes :
mkdir build
cd build
cmake ..
make -j If DPP is installed in a different location you can specify the root directory to look in while running cmake
cmake .. -DDPP_ROOT_DIR=<your-path>
Start the bot:
cd build
./templatebot
You can add as many header files and .cpp files into the src and include folders as you wish. All .cpp files in the src directory will be linked together into the bot's executable.
To rename the bot, search and replace "templatebot" in the CMakeLists.txt with your new bots name and then rename the templatebot folder in include. Rerun cmake .. from the build directory and rebuild.