Add a Plugin

For a list of plugins check out #📃plugin-list on the Discord++ Discord server

Add It to Your Project

  1. Download the Source
    • git submodule add <repository> [<path>] is a nice way to have git still track the remote repositiories
      • After adding the submodules you want, use git submodule update --init --recursive to initialize them.
    • You could also download the plugin as
  2. Place them all in a subdirectory of your project. (I use lib/)

Add It to CMake

  1. Add ADD_SUBDIRECTORY(<relative path>) for Discord++ and each module, e.g.
  1. Add the plugin's equivalent of discordpp-plugin-name and each module to your TARGET_LINK_LIBRARIES command, e.g.
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ... discordpp-plugin-name)

Add It to Your Code

  1. Include the header file for the plugin, e.g.
#include <discordpp/plugin-name.hh>
  1. Add it to your bot object, e.g.
using 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