Giter Site home page Giter Site logo

discordsharp's Introduction

This project is dead. Use DSharpPlus or Discord.NET

DiscordSharp Build status

Welcome to the DiscordSharp dev branch!

A C# API for Discord.

From Nuget

DiscordSharp is now available on NuGet! It is marked as pre-release package at the moment. At your package manager console, type Install-Package DiscordSharp -Pre and it will install the additional dependencies (Newtonsoft.Json & websocket-sharp)

How to use

Discord is what I like to call an "event-based" client. In other words, you get your instance of your client and hook up to its various events: either by lambda or by delegating to external voids. A simple example is as follows..

DiscordClient client = new DiscordClient();
client.ClientPrivateInformation.Email = "email";
client.ClientPrivateInformation.Password = "pass";

client.Connected += (sender, e) =>
{
  Console.WriteLine($"Connected! User: {e.User.Username}");
};
client.SendLoginRequest();
Thread t = new Thread(client.Connect);
t.Start();

This will get you logged in and print out a login notification to the console with the username you've logged in as.

Example Bot

Notes

  • This is such a beta it's not even funny.
  • All of the internal classes are meant to model Discord's internal Json. This is why DiscordMember has a subset ("user") with the actual information.

Cousins

We're all one big happy related family.

Discord.Net, another great C# library - https://github.com/RogueException/Discord.Net

Discord4J, a Java library - https://github.com/austinv11/Discord4J

JDiscord, another Java library - https://github.com/NotGGhost/jDiscord

JDA, anotha one - https://github.com/DV8FromTheWorld/JDA

Javacord, anotha one - https://github.com/BtoBastian/Javacord

discord.io, a Node.js library which I referenced a lot - https://github.com/izy521/discord.io

discord.js, an alternate Node.js library - https://github.com/discord-js/discord.js

discordie, another Node.js library - https://github.com/qeled/discordie

DiscordPHP, a PHP library - https://github.com/teamreflex/DiscordPHP

discord-hypertext, the alternate php library https://github.com/Cleanse/discord-php

discordrb, a Ruby library - https://github.com/meew0/discordrb

discord.py, a Python library - https://github.com/Rapptz/discord.py

discord-akka, a Scala library - https://github.com/eaceaser/discord-akka

go-discord, a Go library (Google Go) - https://github.com/gdraynz/go-discord

discordgo, alternate Google Go library - https://github.com/bwmarrin/discordgo

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.