A .Net API for Discord written in C#
Switch branches/tags
showcase discordsharp-v0.6.0.77-dev discordsharp-v0.6.0.76-dev discordsharp-v0.6.0.75-dev discordsharp-v0.6.0.74-dev discordsharp-v0.6.0.73-dev discordsharp-v0.6.0.72-dev discordsharp-v0.6.0.71-dev discordsharp-v0.6.0.70-dev discordsharp-v0.6.0.69-dev discordsharp-v0.6.0.68-dev discordsharp-v0.6.0.67-dev discordsharp-v0.6.0.50-dev discordsharp-v0.6.0.48-dev discordsharp-v0.6.0.46-dev discordsharp-v0.6.0.45-dev discordsharp-v0.6.0.44-dev discordsharp-v0.6.0.43-dev discordsharp-v0.6.0.42-dev discordsharp-v0.6.0.30-dev discordsharp-v0.6.0.29-dev discordsharp-v0.6.0.28-dev discordsharp-v0.6.0.27-dev discordsharp-v0.6.0.26-dev discordsharp-v0.6.0.24-dev discordsharp-v0.6.0.23-dev discordsharp-v0.6.0.22-dev discordsharp-v0.6.0.21-dev discordsharp-v0.6.0.20-dev discordsharp-v0.6.0.18-dev discordsharp-v0.6.0.17-dev discordsharp-v0.6.0.16-dev discordsharp-v0.6.0.14-dev discordsharp-v0.6.0.13-dev discordsharp-v0.6.0.12-dev discordsharp-v0.6.0.8-dev discordsharp-v0.6.0.7-dev discordsharp-v0.6.0.6-dev discordsharp-v0.6.0.5-dev discordsharp-v0.6.0.4-dev discordsharp-v0.6.0.3-dev discordsharp-v0.6.0.2-dev discordsharp-v0.5.3.45-dev discordsharp-v0.5.3.44-dev discordsharp-v0.5.3.43-dev discordsharp-v0.5.3.41-dev discordsharp-v0.5.3.40-dev discordsharp-v0.5.3.36-dev discordsharp-v0.5.3.35-dev discordsharp-v0.5.3.34-dev discordsharp-v0.5.3.32-dev discordsharp-v0.5.3.31-dev discordsharp-v0.5.3.30-dev discordsharp-v0.5.3.29-dev discordsharp-v0.5.3.28-dev discordsharp-v0.5.3.27-dev discordsharp-v0.5.3.25-dev discordsharp-v0.5.3.24-dev discordsharp-v0.5.3.23-dev discordsharp-v0.5.3.22-dev discordsharp-v0.5.3.21-dev discordsharp-v0.5.3.20-dev discordsharp-v0.5.3.19-dev discordsharp-v0.5.3.18-dev discordsharp-v0.5.3.17-dev discordsharp-v0.5.3.16-dev discordsharp-v0.5.3.15-dev discordsharp-v0.5.3.14-dev discordsharp-v0.5.3.13-dev discordsharp-v0.5.3.12-dev discordsharp-v0.5.3.10-dev discordsharp-v0.5.3.9-dev discordsharp-v0.5.3.8-dev discordsharp-v0.5.3.7-dev discordsharp-v0.5.3.5-master discordsharp-v0.5.3.5-dev discordsharp-v0.5.3.4-master discordsharp-v0.5.3.4-dev discordsharp-v0.5.3.3-master discordsharp-v0.5.3.3-dev discordsharp-v0.5.3.2-master discordsharp-v0.5.3.2-dev discordsharp-v0.5.3.1-master discordsharp-v0.5.3.1-dev discordsharp-v0.5.3.0-master discordsharp-v0.5.3.0-dev discordsharp-v0.5.1.83-master discordsharp-v0.5.1.82-master discordsharp-v0.5.1.81-master discordsharp-v0.5.1.80-master discordsharp-v0.5.1.79-master discordsharp-v0.5.1.78-master discordsharp-v0.5.1.77-master discordsharp-v0.5.1.76-master discordsharp-v0.5.1.75-master discordsharp-v0.5.1.74-master discordsharp-v0.5.1.73-master discordsharp-v0.5.1.72-master discordsharp-v0.5.1.71-master discordsharp-v0.5.1.70-master
Nothing to show
Clone or download
Latest commit 3794b02 Jan 23, 2018

README.md

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