GithubHelp home page GithubHelp logo

crat0z / sleepy-discord Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yourwaifu/sleepy-discord

0.0 0.0 0.0 28.58 MB

C++ library for the Discord chat client

Home Page: https://yourWaifu.github.io/sleepy-discord/

License: MIT License

C++ 94.68% C 1.95% CMake 2.19% Roff 0.55% JavaScript 0.24% Objective-C 0.38%

sleepy-discord's Introduction

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

Build Windows MSVC Ubuntu GCC Ubuntu Clang Docs
Master Build Status Build Status C/C++ CI N/A
Develop Build Status Build Status C/C++ CI documentation

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.

sleepy-discord's People

Contributors

yourwaifu avatar amdoku avatar kiroma avatar oneechanhax avatar plisp avatar macdue avatar barronkane avatar magnuswright avatar b-irb avatar kheartz avatar ldelelis avatar max2408 avatar sirivasv avatar seymourgx avatar theblackwidower avatar azure-pipelines[bot] avatar jaredoconnell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.