Lyo.Discord.Models
1.0.2
dotnet add package Lyo.Discord.Models --version 1.0.2
NuGet\Install-Package Lyo.Discord.Models -Version 1.0.2
<PackageReference Include="Lyo.Discord.Models" Version="1.0.2" />
<PackageVersion Include="Lyo.Discord.Models" Version="1.0.2" />
<PackageReference Include="Lyo.Discord.Models" />
paket add Lyo.Discord.Models --version 1.0.2
#r "nuget: Lyo.Discord.Models, 1.0.2"
#:package Lyo.Discord.Models@1.0.2
#addin nuget:?package=Lyo.Discord.Models&version=1.0.2
#tool nuget:?package=Lyo.Discord.Models&version=1.0.2
Lyo.Discord.Models
Wire-level DTOs and shared constants for the Discord integration. Used by both Lyo.Discord.Client (typed HTTP client) and Lyo.Discord.Postgres (API host + persistence) so request/response shapes stay symmetric.
Request DTOs (Request/)
Mutable request DTOs that the API host maps to its EF entities (audit timestamps are set by CRUD hooks, not by clients). One per Discord domain entity: DiscordUserReq, DiscordGuildReq, DiscordChannelReq, DiscordEmojiReq, DiscordRoleReq, DiscordInteractionReq, DiscordMessageReq, DiscordAttachmentReq, DiscordMemberReq.
Response DTOs (Response/)
Sealed records describing read shapes (typically a subset of entity columns excluding audit timestamps): DiscordUserRes, DiscordGuildRes, DiscordChannelRes, DiscordEmojiRes, DiscordRoleRes, DiscordInteractionRes, DiscordMessageRes, DiscordAttachmentRes, DiscordMemberRes.
Per-guild settings (DiscordGuildSettings.cs)
DiscordGuildSettings is the document persisted by the config store under EntityRef.For<DiscordGuild>(guildId). Versioned for forward-compatibility:
| Property | Description |
|---|---|
Version |
Schema version (CurrentSchemaVersion = 3); bumped via NormalizeForRead / NormalizeForPersistence. |
CommandChannelId |
Channel where the bot accepts commands (null = no restriction by channel). |
LogChannelId |
Channel where the bot posts errors and operational notices (null = disabled). |
AdminRoleId |
Role treated as server admin for bot permission checks. |
ModRoleId |
Role treated as moderator for bot permission checks. |
Revision |
Monotonic config-binding revision; populated on read, cleared before write so it is never persisted. |
ComicReaderChannelId |
When set, comic reading is restricted to this channel. |
ComicDefaultLanguage |
Optional BCP-47 language filter for comic search and chapter lists. |
ComicNsfwAllowed |
When false (default), comic reading is rejected in NSFW channels. |
NormalizeForRead() upgrades older snapshots in-place (e.g. v1 → v2 → v3). NormalizeForPersistence() calls NormalizeForRead() and stamps Version = CurrentSchemaVersion
before save.
Route constants (Constants.cs)
Constants.Rest.Discord centralizes route segments so client managers and host endpoints stay in lock-step:
| Constant / helper | Value |
|---|---|
Route |
"Discord" |
Users, Guilds, Channels, Emojis, Roles, Interactions, Messages, Attachments, Members |
"Discord/User", "Discord/Guild", etc. |
GuildSettings(guildId) |
Discord/Guild/{guildId}/GuildSettings |
GuildSettingsRevisions(guildId) |
Discord/Guild/{guildId}/GuildSettings/Revisions |
GuildSettingsRevert(guildId, revision) |
Discord/Guild/{guildId}/GuildSettings/Revert/{revision} |
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Api.Models— (direct, lyo)Lyo.Common— (transitive, lyo)Lyo.DateAndTime— (transitive, lyo)Lyo.Exceptions— (transitive, lyo)Lyo.Query.Models— (transitive, lyo)Microsoft.Extensions.Logging.Abstractions10.0.5— (transitive, microsoft)System.Memory4.6.3— (transitive, microsoft, netstandard2.0)System.Text.Json10.0.5— (transitive, microsoft, netstandard2.0)
| 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.Models (>= 1.0.2)
-
net10.0
- Lyo.Api.Models (>= 1.0.2)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Lyo.Discord.Models:
| Package | Downloads |
|---|---|
|
Lyo.Discord.Client
Discord API client for querying Discord data via the Lyo API. |
|
|
Lyo.Discord.Postgres
PostgreSQL persistence for Discord entities (EF Core, schema discord). |
GitHub repositories
This package is not used by any popular GitHub repositories.