AndanteTribe.DiscordClient 0.1.0

dotnet add package AndanteTribe.DiscordClient --version 0.1.0
                    
NuGet\Install-Package AndanteTribe.DiscordClient -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AndanteTribe.DiscordClient" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AndanteTribe.DiscordClient" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="AndanteTribe.DiscordClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AndanteTribe.DiscordClient --version 0.1.0
                    
#r "nuget: AndanteTribe.DiscordClient, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AndanteTribe.DiscordClient@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AndanteTribe.DiscordClient&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=AndanteTribe.DiscordClient&version=0.1.0
                    
Install as a Cake Tool

DiscordClient

NuGet Release License

English | 日本語

Overview

DiscordClient is a strongly typed Discord API client. Its async API methods and request and response models are generated from Discord's OpenAPI specification.

  • APIs are grouped by resource, including users, channels, guilds, interactions, and webhooks.
  • Supports Native AOT on .NET 10 and .NET 11 and uses source-generated System.Text.Json metadata for JSON serialization.
  • Optional<T> lets update requests distinguish an omitted field from an explicit null.

Installation

Requirements

The package targets .NET Standard 2.1, .NET 10, and .NET 11. Building from source or using C# 15 union features requires a compiler that supports C# 15, such as the compiler in the .NET 11 SDK. If C# 15 is still a preview in your SDK, set <LangVersion>preview</LangVersion> in your project file.

NuGet

Install AndanteTribe.DiscordClient from NuGet.

.NET CLI
dotnet add package AndanteTribe.DiscordClient
Package Manager
Install-Package AndanteTribe.DiscordClient

Unity

You can install AndanteTribe.DiscordClient in Unity by using NuGetForUnity. For setup instructions, see the NuGetForUnity README.

Unity projects require Unity 6.7 (6000.7) or later. On Unity 6.7 (6000.7) and Unity 7.0 (7000.0), enable the preview language version by passing -langversion:preview in one of these ways:

  • Add -langversion:preview on its own line in Assets/csc.rsp.
  • In Edit > Project Settings > Player > Other Settings > Script Compilation > Additional Compiler Arguments, add -langversion:preview and select Apply.

Quick Start

Set ApiToken in the object initializer to your bot token, without the Bot prefix. The client uses the Bot authentication scheme by default.

using System;
using AndanteTribe.Api.Discord;

using var client = new DiscordClient
{
    ApiToken = "YOUR_BOT_TOKEN"
};

var bot = await client.UsersApi.GetMyUserAsync();
Console.WriteLine(bot.Username);

To send a message with the same client, import AndanteTribe.Api.Discord.Model at the top of your file and pass the target channel ID and a MessageCreateRequest:

var message = await client.ChannelsApi.CreateMessageAsync(
    "YOUR_CHANNEL_ID",
    new MessageCreateRequest { Content = "Hello from DiscordClient!" });

API Reference

  • DiscordClient — configures authentication, request timeouts, and retry attempts. Set ApiToken to supply a token explicitly, and set AuthenticationScheme to "Bearer" when using an OAuth2 access token.
  • REST API interfaces — each interface documents the HTTP method and route for its operations.
  • Request and response models — strongly typed models for Discord API payloads.
  • Optional<T> — leave an update field unset to omit it, or assign null to send an explicit JSON null where the field allows it.

License

This library is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 0 11/28/2026