Discord.Net is distributed through the NuGet package manager; the most
recommended way for you to install this library. Alternatively, you
may also compile this library yourself should you so desire.
Discord.Net targets .NET Standard both 1.3 and 2.0; this also means
that creating applications using the latest version of .NET Core is
the most recommended. If you are bound by Windows-specific APIs or
other limitations, you may also consider targeting .NET Framework
4.6.1 or higher.
[!WARNING]
Using this library with Mono is not supported until further
notice. It is known to have issues with the library's WebSockets
implementation and may crash the application upon startup.
Release builds of Discord.Net will be published to the
official NuGet feed.
Development builds of Discord.Net, as well as add-ons, will be
published to our MyGet feed. See
@Guides.GettingStarted.Installation.Nightlies to learn more.
Discord.Net
.Discord.Net
package.Discord.Net
.Discord.Net
to your .csproj.[!codeSample .csproj]
dotnet add package Discord.Net
.In order to compile Discord.Net, you will need the following:
The .NET Core and Docker workload is required during Visual Studio
installation.
When running any Discord.Net-powered bot on an older operating system
(e.g. Windows 7) that does not natively support WebSocket,
you may encounter a @System.PlatformNotSupportedException upon
connecting.
You may resolve this by either targeting .NET Core 2.1 or later, or
by installing one or more custom packages as listed below.
<TargetFramework>
tag to at least netcoreapp2.1
, or--framework netcoreapp2.1
switch when building.Discord.Net.Providers.WS4Net
Discord.Net.Providers.UDPClient
(Optional)
WebSocketProvider
and the optionalUdpSocketProvider
properties on the DiscordSocketConfig that you[!code-csharpExample]