Add a Plugin
For a list of plugins check out #📃plugin-list on the Discord++ Discord server
Add It to Your Project
- Download the Source
git submodule add <repository> [<path>]is a nice way to havegitstill track the remote repositiories- After adding the submodules you want, use
git submodule update --init --recursiveto initialize them.
- After adding the submodules you want, use
- You could also download the plugin as
- Place them all in a subdirectory of your project. (I use
lib/)
Add It to CMake
- Add
ADD_SUBDIRECTORY(<relative path>)for Discord++ and each module, e.g.
cmakeadd_subdirectory(lib/plugin-name)
- Add the plugin's equivalent of
discordpp-plugin-nameand each module to yourTARGET_LINK_LIBRARIEScommand, e.g.
cmakeTARGET_LINK_LIBRARIES(${PROJECT_NAME} ... discordpp-plugin-name)
Add It to Your Code
- Include the header file for the plugin, e.g.
cpp#include <discordpp/plugin-name.hh>
- Add it to your bot object, e.g.
cppusing DppBot = discordpp::PluginName<...discordpp::Bot...>;
If you're working from Echo or Build-A-Bot as a template you'll need to do this twice in include.hh and once in extern.cc