Skip to content

Sparkles-Laurel/sleepy-discord

This branch is 1 commit ahead of, 236 commits behind yourWaifu/sleepy-discord:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c429781 · Mar 29, 2021
Feb 22, 2021
Jun 5, 2020
Mar 29, 2021
Mar 4, 2021
Mar 13, 2021
Jun 23, 2017
Jun 5, 2020
Sep 29, 2020
Feb 21, 2021
Oct 30, 2016
Feb 17, 2021
Jun 5, 2020

Repository files navigation

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

If you like to edit them, please check out the docs repo.

Build Status

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

Why?

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.

Example

#include "sleepy_discord/sleepy_discord.h"

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

int main() {
	myClientClass client("token", SleepyDiscord::USER_CONTROLED_THREADS);
	client.run();
}

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.

Requirements

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.

About

C++ library for the Discord chat client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.7%
  • CMake 2.2%
  • C 1.9%
  • Other 1.2%