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 6.0 and .NET 5.0, but is also available on older versions, like .NET Standard and .NET Core; this still means that creating applications using the latest version of .NET (6.0) is 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.
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 will be published to our MyGet feed. The MyGet feed can be used to run the latest dev branch builds. It is not advised to use MyGet packages in a production environment, as changes may be made that negatively affect certain library functions.
This exterior branch of Discord.Net has been deprecated and is no longer supported. If you have used Discord.Net-Labs in the past, you are advised to update to the latest version of Discord.Net. All features in Labs are implemented in the main repository.
- Create a new solution for your bot
- In the Solution Explorer, find the "Dependencies" element under your bot's project
Right click on "Dependencies", and select "Manage NuGet packages"
In the "Browse" tab, search for
Compiling from Source
In order to compile Discord.Net, you will need the following:
Using Visual Studio
The .NET 5 workload is required during Visual Studio installation.
Using Command Line
Installing on Unsupported WebSocket Platform
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 PlatformNotSupportedException upon connecting.
You may resolve this by either targeting .NET Core 2.1 or higher, or by installing one or more custom packages as listed below.
- Download the latest [.NET Core SDK].
- Create or move your existing project to use .NET Core.
- Modify your
<TargetFramework>tag to at least
netcoreapp2.1, or by adding the
--framework netcoreapp2.1switch when building.
This page was last modified at 08/01/2022 21:47:53 +02:00 (UTC).
Author: Armano den Boef Commit: bf493ea04007fcf186bdb3d80e3b6993c25d9eef
feat: Labs deprecation & readme expansion (#2406)