D++
An incredibly lightweight C++ Discord library
This project is in alpha stages of development.
Completed so far:
- Websocket connection with heartbeat keepalive and connection resuming
- Caching system for guilds, channels, guild members, roles, users
- Event dispatcher - currently only dispatches a subset of messages including e.g.
on_message_create
andon_guild_create
- Ability to attach handlers to events
- REST HTTPS call system using cpp-httplib
- Message send (
dpp::cluster::message_create()
) - Embeds
- Ratelimit system
- Windows support
To do:
- Add the rest of the discord events
- Add the REST of the HTTP calls (pun intended)
- Ability to receive raw json strings to event handlers
- Shard manager
- Cluster management
- File uploading
Want to help? Drop me a line or send me a PR. I'll be choosy about what PRs i accept whilst the library is in such a heavy state of development.
It is my intention to get this stable enough to use on my production bot, TriviaBot.
Documentation
Documentation will be here in the project wiki when the project is more complete.
Supported OSes
The library runs best on Linux. Windows is supported via cmake and Visual Studio 2019 but not encouraged for production use. The library may work fine in other operating systems too, but with no access to these we cannot support them.
Dependencies
External Dependencies (You must install these)
Included Dependencies (Packaged with the library)
Linux Setup
1. Build Source Code
mkdir build
cd build
cmake ..
make -j8
Replace the number after -j with a number suitable for your setup, usually the same as the number of cores on your machine. cmake
will fetch any dependencies that are required for you and ensure they are compiled alongside the library.
2. Run test cases
run ./test
for unit test cases.
3. Install to /usr/local/include and /usr/local/lib
make install
coming soon!