Skip to content
C++ library for the Discord chat client
C++ CMake C Python
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
buildtools fixed 'make clean' Dec 29, 2018
examples Stop heart beating while reconnecting Aug 29, 2018
include/sleepy_discord Update common_return_types.h May 16, 2019
sleepy_discord Stop reconnection timer after being connected Apr 20, 2019
.gitattributes session isn't objective c Jun 23, 2017
.gitignore Fix build issues in linux Apr 20, 2019
.travis.yml overheal cmake support Aug 4, 2018
CMakeLists.txt Fix build issues in linux Apr 20, 2019 Create Oct 30, 2016 Update Apr 13, 2019
azure-pipelines.yml Update Apr 2, 2018
sleepy_discord.sln Removed WebAssembly client and renamed x86 in Visual studio sln file Jan 26, 2018

Sleepy Discord

C++ library for Discord

Note: Sleepy Discord is pronounced as CP Discord, like the letters C and P. Actually, that's a joke. Sleepy should be pronounced the way you would normally pronounce sleepy.

Discord Server


📝 Getting Started
📝 How to make a Basic Text Bot

If you like to edit them, please check out the docs branch or click on the 📝.

Build Status

OS Windows Ubuntu
Master Build Status Build Status
Develop Build Status Build Status


Just for the novelty of using a C++ library for Discord. I would also love for this thing to work on many things like consoles and maybe some microcontrollers.


#include "sleepy_discord/websocketpp_websocket.h"

class MyClientClass : public SleepyDiscord::DiscordClient {
	using SleepyDiscord::DiscordClient::DiscordClient;
	void onMessage(SleepyDiscord::Message message) override {
		if (message.startsWith("whcg hello"))
			sendMessage(message.channelID, "Hello " +;

int main() {
	MyClientClass client("token", 2);;

Input: Message received

whcg hello

Possible Output: Message sent

Hello Sleepy Flower Girl

More complex examples:

Will Updating the library break my bot?

Yes, and for now I don't plan on making 0.0 versions backwards compatible with 1.0 versions or later.


Sleepy Discord doesn't require you to use any libraries, so that you can use any library you wish or your own code. However, Sleepy Discord provides native support for a few libraries and it is recommend you use those instead of writing your own.

Develop Branch

For the cutting edge of Sleepy Discord, check out the develop branch. Please use the develop branch with caution because it may not even be able to compile or it is 100% not tested at all. Other then that, the branch is used for code that may not work. Also check to see if it's not behind the master branch, unless you want to use an older version of Sleepy Discord.

You can’t perform that action at this time.