Frequently Asked Questions
Where should I start?
Echo has detailed setup instructions uses all of Discord++'s basic functions
https://github.com/DiscordPP/echo-bot
How do I use the Linux setup instructions if I'm on Windows?
You could dual-boot or get Discord++ to work with a Windows compiler, but I'd recommend using WSL
https://docs.microsoft.com/en-us/windows/wsl/install-win10
What Linux Distribution should I use?
For beginners, I'd recommend Ubuntu. You could (1) install it under WSL or (2) install it to your system
(1) https://www.microsoft.com/en-us/p/ubuntu/9nblggh4msv6
(2) https://www.ubuntu.com/download/desktop
Is this a Discord app for iOS?
No. The video you came from was baseless speculation about a BetterDiscord app for iOS being called Discord++.
How can I compile Boost myself if my distro has an old version?
It will vary from distro to distro, but try compiling Boost like so: https://ubuntuforums.org/showthread.php?t=1180792
It may just work
Can you teach me C++?
While Discord++ can make for a great beginner's C++ project, it isn't a great thing to learn C++ with. I'd highly recommend Codecademy for that, their C++ course is free: https://www.codecademy.com/learn/learn-c-plus-plus
How do I use Nlohmann's JSON library?
Check out the library's README, it's pretty darn good: https://github.com/nlohmann/json
How do I clone with submodules?
Add --recursive
to git clone
for git clone --recursive <repository>
or you can clone using a graphical tool like GitKraken: https://www.gitkraken.com/invite/mS1RATY9
How can I download the submodules if I have already cloned the repo non-recursively?
git submodule update --init --recursive
My bot takes a long time to compile.
Why?
Discord++ is a heard-only library. For some general info, you can read about them in the answers to this question on StackOverflow. The short answer here, though, is that Discord++ is header-only to simplify cross-platform compatibility and to enable the templates for its plugin system
How can I make it faster?
Your compiler choice can make a huge difference.
I (Aido) currently use Ubuntu 22.04.1 LTS in WSL2 on Windows 11 and when I swap from gcc
to clang
compilations take 1/4 as long, but your results may vary.
Echo also has a system for partial builds, which you can see implemented in its CMakeLists.txt
.
By way of precompiling its headers and moving the bot definition to a second object, a clean debug build that takes 6 minutes on gcc
and 1.5 minutes on clang
is shortened to 1 minute on both when only the main.cc
file is changed.
You can also do your initial build outside your IDE to reduce that initial compilation time.