Lyo.Discord.Client
1.0.3
dotnet add package Lyo.Discord.Client --version 1.0.3
NuGet\Install-Package Lyo.Discord.Client -Version 1.0.3
<PackageReference Include="Lyo.Discord.Client" Version="1.0.3" />
<PackageVersion Include="Lyo.Discord.Client" Version="1.0.3" />
<PackageReference Include="Lyo.Discord.Client" />
paket add Lyo.Discord.Client --version 1.0.3
#r "nuget: Lyo.Discord.Client, 1.0.3"
#:package Lyo.Discord.Client@1.0.3
#addin nuget:?package=Lyo.Discord.Client&version=1.0.3
#tool nuget:?package=Lyo.Discord.Client&version=1.0.3
Lyo.Discord.Client
Typed HTTP client for the Discord REST surface exposed by Lyo.Api (the Discord/* group registered by Lyo.Discord.Postgres). Wraps Lyo.Api.Client.ApiClient so all Lyo-API behavior — Accept-Encoding, request compression, problem-details parsing — comes for free.
Examples
DI registration (Extensions.cs)
services.AddDiscordClientFromConfiguration(builder.Configuration);
// or:
services.AddDiscordClient(o => {
o.BaseUrl = "https://api.example.com/";
o.RequestCompression = ApiRequestCompressionType.Gzip;
});
Surface
LyoDiscordClient is the entry point. It subclasses ApiClient and exposes nine manager properties under Managers/:
| Property | Manager | Endpoints (relative to API base) |
|---|---|---|
Guilds |
GuildManager |
Discord/Guild Query/Get/Upsert/Bulk Upsert; …/{guildId}/GuildSettings GET/PUT |
Users |
UserManager |
Discord/User Query/Get/Upsert/Bulk Upsert |
Channels |
ChannelManager |
Discord/Channel Query/Get/Upsert/Bulk Upsert |
Roles |
RoleManager |
Discord/Role Query/Get/Upsert/Bulk Upsert |
Emojis |
EmojiManager |
Discord/Emoji Query/Get/Upsert/Bulk Upsert |
Interactions |
InteractionManager |
Discord/Interaction Query/Get/Upsert/Bulk Upsert |
Messages |
MessageManager |
Discord/Message Query and Bulk Upsert |
Attachments |
AttachmentManager |
Discord/Attachment Query/Get/Upsert |
Members |
MemberManager |
Discord/Member Query/Upsert/Bulk Upsert/Patch (composite PK (UserId, GuildId) so no GET-by-id) |
Routes come from Lyo.Discord.Models.Constants.Rest.Discord; request/response DTOs from
Lyo.Discord.Models. Guild-settings methods on GuildManager (GetSettingsAsync, PutSettingsAsync) hit the config-store routes mapped by
MapDiscordGuildSettingsEndpoints.
Options (LyoDiscordClientOptions)
Configuration section: LyoDiscordClient (shadows the base ApiClient section). Inherits all ApiClientOptions flags (BaseUrl, EnsureStatusCode, AcceptEncodings, RequestCompression, …). Default BaseUrl is http://localhost:5251/ so it works against a locally-hosted Lyo API host out of the box; override for any other deployment.
DI registration (Extensions.cs)
| Method | Description |
|---|---|
AddDiscordClientFromConfiguration(configuration, sectionName?) |
Binds LyoDiscordClientOptions from configuration (default section "LyoDiscordClient") and registers LyoDiscordClient singleton. |
AddDiscordClient(Action<LyoDiscordClientOptions> configure) |
Builds options inline. |
AddDiscordClient(LyoDiscordClientOptions options) |
Registers a pre-built options instance. |
All overloads inject any registered ILoggerFactory and reuse a shared HttpClient from DI when present; otherwise the underlying ApiClient constructor builds its own
handler with auto-decompression enabled.
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Api.Client— (direct, lyo)Lyo.Api.Models— (direct, lyo)Lyo.Discord.Models— (direct, lyo)Lyo.Query.Models— (direct, lyo)Microsoft.Extensions.Configuration.Binder10.0.5— (direct, microsoft)Lyo.Common— (transitive, lyo)Lyo.DateAndTime— (transitive, lyo)Lyo.Diagnostic— (transitive, lyo)Lyo.Exceptions— (transitive, lyo)Lyo.Hashing— (transitive, lyo)Lyo.PackageMetadata— (transitive, lyo)Microsoft.Extensions.DependencyInjection.Abstractions10.0.5— (transitive, microsoft)Microsoft.Extensions.Http10.0.5— (transitive, microsoft)Microsoft.Extensions.Logging.Abstractions10.0.5— (transitive, microsoft)System.IO.Hashing10.0.5— (transitive, microsoft, net10.0)System.Memory4.6.3— (transitive, microsoft, netstandard2.0)System.Text.Json10.0.5— (transitive, microsoft, netstandard2.0)System.Threading.Tasks.Extensions4.6.3— (transitive, microsoft)
| Product | Versions 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Lyo.Api.Client (>= 1.0.3)
- Lyo.Api.Models (>= 1.0.3)
- Lyo.Discord.Models (>= 1.0.3)
- Lyo.Query.Models (>= 1.0.3)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.5)
-
net10.0
- Lyo.Api.Client (>= 1.0.3)
- Lyo.Api.Models (>= 1.0.3)
- Lyo.Discord.Models (>= 1.0.3)
- Lyo.Query.Models (>= 1.0.3)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Lyo.Discord.Client:
| Package | Downloads |
|---|---|
|
Lyo.Discord.Bot
DSharpPlus bot host that syncs Discord guild data to the Lyo API (DI, configuration, extensible base class). |
GitHub repositories
This package is not used by any popular GitHub repositories.