A C# API for Discord based off DiscordSharp :3
Start off by creating a new C# console application project. Then open up the NuGet Console (Project -> Manage Nuget Packages...). Enter Install-Package DSharpPlus -Pre
.
Then move to Step 2.
First start off by downloading the git repo
git clone https://github.com/NaamloosDT/SharpCord.git
Then open the project in Visual Studio, and build the class library. After you have done that, make a new C# console application project. Set the class library as a reference. Then use move to Step 2.
Start your bot off with this code.
using DSharpPlus;
class Program {
static void Main(string[] args)
{
DiscordClient client = new DiscordClient("INSERT YOUR TOKEN HERE", true);
Console.WriteLine("Attempting to connect!");
try
{
client.SendLoginRequest();
client.Connect();
} catch (Exception e)
{
Console.WriteLine(e.Message);
}
client.Connected += (sender, e) =>
{
Console.WriteLine("CLIENT CONNECTED");
};
}
}
In a nutshell, the code will allow your bot to connect to the server. Head to the Example Bot on how to get started with commands and othere portions of the bot.
Come talk to us here! ❤
The changelog can be found in the Changelog.md file